Django

Code

Ticket #7097 (closed: fixed)

Opened 2 months ago

Last modified 2 months ago

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

Reported by: adrian Assigned to: nobody
Milestone: Component: Database wrapper
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation:
Needs tests: Patch needs improvement:

Description

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.

Attachments

Change History

04/27/08 19:03:02 changed by adrian

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

04/27/08 19:20:42 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(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


Add/Change #7097 (QuerySet.select_related().dates() includes duplicate dates if foreign-key values are different for same day)




Change Properties
Action