Opened 9 years ago

Closed 9 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)

0001-get_db_prep_value-on-year_lookup_bounds_for_date-dat.patch (1.5 KB ) - added by Andreas Nüßlein 9 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by Tim Graham, 9 years ago

Could you add a regression test for your patch to demonstrate what bug this fixes?

comment:2 by Tim Graham, 9 years ago

Resolution: needsinfo
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top