#34589: exclude does not support nested ForeignKey relationship
-------------------------------------+-------------------------------------
Reporter: ftamy9 | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: 4.1 | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => invalid
Comment:
The following query works for me:
{{{
working_shipments = Shipment.objects.exclude(
trip__method__title=ShippingChoice.ORGANIZATION
).filter(
updated_at__lt=datetime.datetime.now(),
)
}}}
Again, please try to use support channels.
--
Ticket URL: <https://code.djangoproject.com/ticket/34589#comment:12>
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/0107018847e8be15-7d3ff5f5-ea12-43bc-abb6-8bc784258419-000000%40eu-central-1.amazonses.com.