From e0de60622128cd285cd2ae4738cec2a43f6a6552 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 17 Apr 2020 12:53:03 +0200 Subject: [PATCH] Fix overlapping conditions in User.state_sync --- users/models.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/users/models.py b/users/models.py index 7f2481cb..0f04aeaf 100755 --- a/users/models.py +++ b/users/models.py @@ -643,6 +643,7 @@ class User( self.__original_state != self.STATE_ACTIVE and self.state == self.STATE_ACTIVE ): + self.email_change_date = None self.unarchive() elif ( self.__original_state != self.STATE_ARCHIVE @@ -659,10 +660,6 @@ class User( and self.state == self.STATE_EMAIL_NOT_YET_CONFIRMED ): self.email_change_date = timezone.now() - elif ( - self.state == self.STATE_ACTIVE - ): - self.email_change_date = None def ldap_sync( self, base=True, access_refresh=True, mac_refresh=True, group_refresh=False