#33769: F() expressions - OperationalError
-------------------------------+--------------------------------------
Reporter: Pablo | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 3.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by Simon Charette):
I'm pretty sure this was never meant to be supported or that it possibly
generated wrong results but I'll let others chimes in. In the mean type
you can get an equivalent query with
{{{#!python
WorkShift.objects.filter(
season__in=seasons,
type__in=Season.chief_tipes.through.objects.filter(
season=OuterRef('season'),
).values('workshifttype'),
end_date__gte=today,
).filter(
Q(start_date__lte=today) | Q(start_date__lte=today +
datetime.timedelta(hours=12))
)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33769#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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070181364320ae-620e2a57-8229-4384-b7cd-fb31d7344fa2-000000%40eu-central-1.amazonses.com.