Opened 7 years ago

Closed 7 years ago

#7097 closed (fixed)

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

Reported by: adrian Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:


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

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

comment:2 Changed 7 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(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