Opened 11 years ago

Closed 11 years ago

#8093 closed (worksforme)

ForeignKey's raise DoesNotExist instead of returning None

Reported by: David Cramer Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When accessing a nullable ForeignKey it raises a DoesNotExist error instead of returning None when the value is set to NULL.

Change History (2)

comment:1 Changed 11 years ago by Gary Wilson

(In [8198]) Added tests for accessing nullable ForeignKey after saving and fetching from the database (refs #8093).

comment:2 Changed 11 years ago by Gary Wilson

Resolution: worksforme
Status: newclosed

Can you provide a failing test case, as tests in [8185] and [8189] seem to cover your situation.

Note: See TracTickets for help on using tickets.
Back to Top