Opened 11 years ago
Closed 11 years ago
#24596 closed Bug (needsinfo)
year_lookup_bounds_for_date_field should be evaluated via get_db_prep_value in get_db_prep_lookup
| Reported by: | Andreas Nüßlein | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 1.8 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I think the summary says it all..
If i return datetime.date or datetime.datetime objects from my overwritten year_lookup_bounds_for_date_field() function they will not be casted to a corresponding string for the database to understand.
i might be making a mistake some place else in my database driver, but my solution right now is attached here as a patch.
Attachments (1)
Change History (3)
by , 11 years ago
| Attachment: | 0001-get_db_prep_value-on-year_lookup_bounds_for_date-dat.patch added |
|---|
comment:1 by , 11 years ago
comment:2 by , 11 years ago
| Resolution: | → needsinfo |
|---|---|
| Status: | new → closed |
The code your patch modifies will be moved in this pull request. It looks like to me like that PR might solve your issue, although I am not too sure what the issue is. Please reopen if you can provide details.
Could you add a regression test for your patch to demonstrate what bug this fixes?