Opened 7 years ago

Closed 7 years ago

#8093 closed (worksforme)

ForeignKey's raise DoesNotExist instead of returning None

Reported by: dcramer 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: UI/UX:


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 7 years ago by gwilson

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

comment:2 Changed 7 years ago by gwilson

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed

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