[Django] #24596: year_lookup_bounds_for_date_field should be evaluated via get_db_prep_value in get_db_prep_lookup

6 views
Skip to first unread message

Django

unread,
Apr 7, 2015, 10:53:22 AM4/7/15
to django-...@googlegroups.com
#24596: year_lookup_bounds_for_date_field should be evaluated via get_db_prep_value
in get_db_prep_lookup
----------------------------------------------+--------------------
Reporter: nutztherookie | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/24596>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 7, 2015, 10:56:01 AM4/7/15
to django-...@googlegroups.com
#24596: year_lookup_bounds_for_date_field should be evaluated via get_db_prep_value
in get_db_prep_lookup
------------------------------------------+----------------------------

Reporter: nutztherookie | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: 1.8
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+----------------------------
Changes (by nutztherookie):

* Attachment "0001-get_db_prep_value-on-year_lookup_bounds_for_date-
dat.patch" added.

Django

unread,
Apr 7, 2015, 10:58:41 AM4/7/15
to django-...@googlegroups.com
#24596: year_lookup_bounds_for_date_field should be evaluated via get_db_prep_value
in get_db_prep_lookup
-------------------------------------+-------------------------------------

Reporter: nutztherookie | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.8
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24596#comment:1>

Django

unread,
Apr 16, 2015, 10:51:34 AM4/16/15
to django-...@googlegroups.com
#24596: year_lookup_bounds_for_date_field should be evaluated via get_db_prep_value
in get_db_prep_lookup
-------------------------------------+-------------------------------------
Reporter: nutztherookie | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: 1.8
(models, ORM) |
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => needsinfo


Comment:

The code your patch modifies will be moved in
[https://github.com/django/django/pull/4393 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/24596#comment:2>

Reply all
Reply to author
Forward
0 new messages