Opened 16 years ago

Last modified 13 years ago

#7155 closed

dates() querysets don't work after qsrf — at Initial Version

Reported by: fcaprioli@… Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords: qsrf-cleanup post-qsrf
Cc: eric@…, jdunck@…, jarek.zgoda@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

After queryset refactor merge, a .dates() DateQueryset won't work on a null=True DateField.

During query setup, the queryset adds a .filter(fieldnameisnull=True) instead of .filter(fieldnameisnull=False) to avoid parsing null dates, so the resulting sql returns an empty list (or raise errors if there actually are null fields in the db).

I've attached a patch that fixes the problem

Change History (1)

by fcaprioli@…, 16 years ago

Attachment: null_dates.patch added
Note: See TracTickets for help on using tickets.
Back to Top