Opened 16 years ago

Closed 16 years ago

#7097 closed (fixed)

QuerySet.select_related().dates() includes duplicate dates if foreign-key values are different for same day

Reported by: Adrian Holovaty Owned by: nobody
Component: Database layer (models, ORM) 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


Marco brought this up here as a bug in the admin, but I've tracked it back to being a bug in the way the post-queryset-refactor dates() model API works. Failing tests and fix forthcoming.

Change History (2)

comment:1 Changed 16 years ago by Adrian Holovaty

(In [7485]) Added some tests to modeltests/many_to_one that demonstrate a post-queryset-refactor bug in dates(). Refs #7097

comment:2 Changed 16 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [7486]) Fixed #7097 -- dates() queries now work as expected with select_related() -- that is, select_related() has no effect on the query. Thanks for reporting, Marco

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