Code

Opened 6 years ago

Closed 6 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:

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 (0)

Change History (2)

comment:1 Changed 6 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 6 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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.