#29852: Infinite migrations when using SimpleLazyObject in field arguments
------------------------------+------------------------------------
Reporter: Javier Buzzi | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Comment (by Javier Buzzi):
@SimonCharette This somewhat does the trick but still break things...
{{{
diff --git a/django/utils/functional.py b/django/utils/functional.py
index 1481bf4a5e..4da48bdb1b 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -209,6 +209,9 @@ empty = object()
def new_method_proxy(func):
def inner(self, *args):
+ if args and isinstance(args[0], type(self)):
+ return func(self._wrapped, args[0]._wrapped)
if self._wrapped is empty:
self._setup()
return func(self._wrapped, *args)
}}}
What do you suggest?
--
Ticket URL: <https://code.djangoproject.com/ticket/29852#comment:5>
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/069.3fce7a325346e2cfd685cafe525e06d0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.