#12708: Django raises DoesNotExist when consulting an empty ForeignKey field
-------------------------------------+-------------------------------------
Reporter: lsaffre | Owner: nobody
Type: Uncategorized | Status: closed
Component: Database layer | Version: master
(models, ORM) | Resolution: invalid
Severity: Normal | Triage Stage:
Keywords: ForeignKey | Unreviewed
DoesNotExist | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by lsaffre):
Thanks, Luis.
Luke, Django would be better if the value of a non-nullable foreign key
object was allowed be None. The nullability of a field should become
significant only when we try to save it. Forcing us to use journal_id here
(not journal) is odd. This behaviour might have been intended at some
time, and I agree that changing it might cause some backwards
incompatibility, but that does not make and odd behaviour *good*.
--
Ticket URL: <https://code.djangoproject.com/ticket/12708#comment:3>
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/065.7a5ef4ba4eda3a88246458196515ebd3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.