From 59347ef36fc032717ffa462bb56edd17b2a09d45 Mon Sep 17 00:00:00 2001 From: Lucas Wiman Date: Thu, 28 Jun 2018 13:52:52 -0700 Subject: [PATCH] Correctly clean up recursion sentinel value. --- model_utils/tracker.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/model_utils/tracker.py b/model_utils/tracker.py index a0bc0d0..e1e61fe 100644 --- a/model_utils/tracker.py +++ b/model_utils/tracker.py @@ -63,8 +63,7 @@ class DescriptorWrapper(object): # This will undefer the field getattr(instance, self.field_name) finally: - if already_setting: - instance.__dict__.pop(recursion_sentinel_attname, None) + instance.__dict__.pop(recursion_sentinel_attname, None) if hasattr(self.descriptor, '__set__'): self.descriptor.__set__(instance, value) else: