#34847: Serializer infinite recursion on M2M field if reference vars in init
-------------------------------------+-------------------------------------
Reporter: Arthur Hanson | Owner: nobody
Type: Bug | Status: closed
Component: Core | Version: 4.2
(Serialization) |
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* cc: model, init, recursionerror (added)
* status: new => closed
* resolution: => invalid
* stage: Accepted => Unreviewed
Comment:
I agree with your assessment David,
[https://code.djangoproject.com/ticket/31435#comment:2 this came up] when
adjusting cascade deletion to limit the number of fields that get selected
(#30191).
In order for your model definition `__init__` override to adequately
support field deferral, which is a feature the serialization framework
make use of, you must use `self.__dict__.get(field_name)` to retrieve
possibly deferred values.
--
Ticket URL: <https://code.djangoproject.com/ticket/34847#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/0107018aa9a1d7a7-27c1c858-aed8-435d-b2a0-24941b4106f9-000000%40eu-central-1.amazonses.com.