Opened 5 years ago

Closed 5 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


I think the summary says it all..

If i return 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 5 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 5 years ago by Tim Graham

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

comment:2 Changed 5 years ago by Tim Graham

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