Changes between Version 1 and Version 2 of Ticket #31435, comment 2
- Timestamp:
- Apr 8, 2020, 8:28:26 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31435, comment 2
v1 v2 6 6 7 7 You want to do `self._old_frequency = self.__dict__.get('frequency')` in there. 8 9 For the record the commit that introduced the recursion error for your bogus `Model.__init__` is f110de5c04818b8f915dcf65da37a50c1424c6e6 which started deferring fields of model when possible to avoid fetching large amount of data when unnecessary on deletion (#30191). 10 11 It is also [https://docs.djangoproject.com/en/3.0/ref/models/instances/#customizing-model-loading documented that the right way to implement custom model loading] should be done using `Model.from_db()`. I guess you could assign `django.db.models.DEFERRED` to `_old_frequency` in there and special case it's access when necessary instead of assigning `None` to it.