#24486: UnboundLocalError in db.models.expressions
-------------------------------------+-------------------------------------
Reporter: yoyoma | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jarshwah):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
I can see the problem in the code, but I can't replicate the error for
some reason.
{{{
In [16]: Ticket.objects.filter(
active_at__lte=now,
active_at__gt=now - models.F('duration')
)
Out[16]: [<Ticket: Ticket object>]
}}}
Is there something else in your query that helps to trigger this
condition? Though I doubt it'll make a difference, which database are you
using to test?
--
Ticket URL: <https://code.djangoproject.com/ticket/24486#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.69a70f4b3315766153d3c08b37924105%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.