Infinite loop when using double MonitorField from django-model-utils with defer()/only()
See original GitHub issueWe just upgraded to Django 1.10 and use DirtyFieldsMixin
all over the place. After much debugging after finding an issue, we’ve noticed that when using .only()
or .defer()
with .get()
on a model that subclasses DirtyFieldsMixin
, you will end up in an infinite loop that maxes out with a maximum recursion error.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:28 (13 by maintainers)
Top Results From Across the Web
5 Gotchas of Defer in Go — Part I | by Inanc Gumus
Here, defer row.Close() calls inside the loop don't get executed until the func ends — not when each step of for loop ends....
Read more >go - Proper way to release resources with defer in a loop?
Execution of a deferred function is not only delayed, deferred to ... Close() returns an error which when called using defer is discarded....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I finally managed to write a failing test!
https://travis-ci.org/jdotjdot/django-dirtyfields
Sorry about that @vannitotaro… I thought I released a new version few time ago. Thanks for investigating!
I will release a new version tomorrow!