#36442: Reusing same instance of FilteredRelations in multiple queries result in django.core.exceptions.FieldError: Cannot resolve keyword -------------------------------------+------------------------------------- Reporter: Viliam Mihálik | Owner: (none) Type: Bug | Status: new Component: Database layer | Version: 5.0 (models, ORM) | Severity: Normal | Resolution: Keywords: FilteredRelation, | Triage Stage: Accepted ORM | Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Simon Charette):
* stage: Unreviewed => Accepted * type: Uncategorized => Bug * version: 5.2 => 5.0 Comment: We should definitely clone the filtered relation on resolving, the bug is present since 5.0 though so it doesn't qualify for a backport. Would you be interested in submitting a patch here? I suspect adjusting `FilteredRelation.clone` to make sure it passes `condition=self.condition.clone()` should do? -- Ticket URL: <https://code.djangoproject.com/ticket/36442#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 django-updates+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/django-updates/0107019741ea3a06-2f46ad21-21d0-4352-a53e-0ed7f7f17a5d-000000%40eu-central-1.amazonses.com.