question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Infinite loop when using double MonitorField from django-model-utils with defer()/only()

See original GitHub issue

We 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:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:28 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
jdotjdotcommented, Nov 17, 2016

I finally managed to write a failing test!

https://travis-ci.org/jdotjdot/django-dirtyfields

2reactions
romgarcommented, Nov 15, 2016

Sorry about that @vannitotaro… I thought I released a new version few time ago. Thanks for investigating!

I will release a new version tomorrow!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found