Skip to content

Support nullable foreign keys with read_only=False#25

Open
fabricemarie wants to merge 1 commit intoevenicoulddoit:masterfrom
fabricemarie:writable_null_support
Open

Support nullable foreign keys with read_only=False#25
fabricemarie wants to merge 1 commit intoevenicoulddoit:masterfrom
fabricemarie:writable_null_support

Conversation

@fabricemarie
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
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 👍

utils.model_from_definition(field_definition['id_model'])
.objects.all()
)
if 'allow_null' in field_definition.keys():
Copy link
Copy Markdown
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