#22656: Adding check for FK that blank=False when null=False
-------------------------------------+-------------------------------------
Reporter: anubhav9042 | Owner:
Type: Bug | anubhav9042
Component: Database layer | Status: closed
(models, ORM) | Version: master
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
Has patch: 1 | Unreviewed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by anubhav9042):
Replying to [comment:4 aaugustin]:
> Agreed with Tim, that's a use case we want to support.
I have added this for `ForeignKey` only not for other fields. In others it
is fine but in FK it will create `database errors` on `save()` if any
object is not provided.
If null=False then keeping blank=True for `ForeignKey` is wrong and will
lead to errors in save() as said above. I think that was what I wanted to
say and could not explain earlier.
--
Ticket URL: <https://code.djangoproject.com/ticket/22656#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.3840c35ac2d5cecd11148087d5b227e1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.