8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 07:02:26 +00:00

Fix overlapping conditions in User.state_sync

This commit is contained in:
Jean-Romain Garnier 2020-04-17 12:53:03 +02:00 committed by Gabriel Detraz
parent b7021f32cb
commit e0de606221

View file

@ -643,6 +643,7 @@ class User(
self.__original_state != self.STATE_ACTIVE self.__original_state != self.STATE_ACTIVE
and self.state == self.STATE_ACTIVE and self.state == self.STATE_ACTIVE
): ):
self.email_change_date = None
self.unarchive() self.unarchive()
elif ( elif (
self.__original_state != self.STATE_ARCHIVE self.__original_state != self.STATE_ARCHIVE
@ -659,10 +660,6 @@ class User(
and self.state == self.STATE_EMAIL_NOT_YET_CONFIRMED and self.state == self.STATE_EMAIL_NOT_YET_CONFIRMED
): ):
self.email_change_date = timezone.now() self.email_change_date = timezone.now()
elif (
self.state == self.STATE_ACTIVE
):
self.email_change_date = None
def ldap_sync( def ldap_sync(
self, base=True, access_refresh=True, mac_refresh=True, group_refresh=False self, base=True, access_refresh=True, mac_refresh=True, group_refresh=False