Opened 16 years ago

Closed 16 years ago

#8093 closed (worksforme)

ForeignKey's raise DoesNotExist instead of returning None

Reported by: David Cramer Owned by: nobody
Component: Core (Other) Version: dev
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

Description

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 by Gary Wilson, 16 years ago

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

comment:2 by Gary Wilson, 16 years ago

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