#7448 closed (fixed)
DateField + __in query = no query at all
Reported by: | Collin Grady | Owned by: | Malcolm Tredinnick |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
There seems to be a problem with DateField and an __in
query - in both sqlite and mysql (haven't tested postgres yet), it results in no query whatsoever
>>> Bar.objects.filter(b__in=[date(2008, 6, 9), date(2008, 6, 10), date(2008, 6, 12)]) [] >>> connection.queries []
investigating further, will post more info if I get it
Attachments (2)
Change History (10)
by , 17 years ago
Attachment: | 7448-datefield-in.patch added |
---|
comment:1 by , 17 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 17 years ago
Attachment: | 7448-datefield-in.2.patch added |
---|
comment:2 by , 17 years ago
Needs tests: | set |
---|
comment:3 by , 16 years ago
#7707 is a dup but contains a patch with a test that might be useful since this one has needs_tests set to 1.
comment:4 by , 16 years ago
milestone: | → 1.0 |
---|
comment:5 by , 16 years ago
someone was supposed to be attaching a better patch to this one, but it appears to be taking a little longer than planned :)
comment:6 by , 16 years ago
Owner: | changed from | to
---|
I'll tackle this today. No need to attach the patch from the other ticket. I'll review that in the normal process of things.
comment:7 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
there's probably a better way to do this, but this patch fixes the issue :)