#31415: Nested OuterRefs produce error when used as argument to Left
-------------------------------------+-------------------------------------
Reporter: Ben Nace | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer | Version: 3.0
(models, ORM) |
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):
Sorry my mistake, I misread the ticket description and thought this was
about `update` as well.
Could you try simply adding this method to `OuteRef` and see if it
addresses your crash?
{{{#!diff
diff --git a/django/db/models/expressions.py
b/django/db/models/expressions.py
index 84960d77e1..4b24953a3d 100644
--- a/django/db/models/expressions.py
+++ b/django/db/models/expressions.py
@@ -581,6 +581,9 @@ class OuterRef(F):
return self.name
return ResolvedOuterRef(self.name)
+ def relabeled_clone(self, relabels):
+ return self
+
class Func(SQLiteNumericMixin, Expression):
"""An SQL function call."""
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31415#comment:4>
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/071.80efb60318864343754e7c64b3257736%40djangoproject.com.