1
0
Fork 0

Use user.reactivate when a user confirms their email address

This is cleaner and easier to maintain.
This commit is contained in:
Mouse Reeve 2022-12-11 11:43:30 -08:00
parent ac8b060d58
commit 50a42dc0a2
2 changed files with 5 additions and 4 deletions

View file

@ -390,7 +390,10 @@ class User(OrderedCollectionPageMixin, AbstractUser):
self.is_active = True
self.deactivation_reason = None
self.allow_reactivation = False
super().save(broadcast=False)
super().save(
broadcast=False,
update_fields=["deactivation_reason", "is_active", "allow_reactivation"],
)
@property
def local_path(self):