mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-22 15:08:07 +00:00
Set deactivation date
This commit is contained in:
parent
430554444f
commit
3e7847e645
1 changed files with 5 additions and 0 deletions
|
@ -270,6 +270,11 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
|||
|
||||
# this user already exists, no need to populate fields
|
||||
if not created:
|
||||
if self.is_active:
|
||||
self.deactivation_date = None
|
||||
elif not self.deactivation_date:
|
||||
self.deactivation_date = timezone.now()
|
||||
|
||||
super().save(*args, **kwargs)
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue