Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support nullable foreign keys with read_only=False #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support nullable foreign keys with read_only=False #25

wants to merge 1 commit into from

Conversation

fabricemarie
Copy link

No description provided.

Copy link
Owner

@evenicoulddoit evenicoulddoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. Just one little gripe with the code, but also, I think this feature needs to be tested 👍

@@ -545,6 +545,8 @@ def get_expand_id_field(self, field_name, field_definition):
utils.model_from_definition(field_definition['id_model'])
.objects.all()
)
if 'allow_null' in field_definition.keys():
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be better as field_definition.get('allow_null')?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants