mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 07:23:46 +00:00
Fix disable_emailnotyetconfirmed task
This commit is contained in:
parent
289f6caa88
commit
8c99f54145
1 changed files with 2 additions and 2 deletions
|
@ -34,11 +34,11 @@ class Command(BaseCommand):
|
|||
days = OptionalUser.get_cached_value("disable_emailnotyetconfirmed")
|
||||
users_to_disable = (
|
||||
User.objects.filter(state=User.STATE_EMAIL_NOT_YET_CONFIRMED)
|
||||
.exclude(email_change_date__is_null=True)
|
||||
.filter(email_change_date__lte=timezone.now() - timedelta(days=days))
|
||||
.distinct()
|
||||
)
|
||||
print("Disabling " + str(users_to_disable.count()) + " users.")
|
||||
|
||||
for user in users_to_disable:
|
||||
self.state = User.STATE_DISABLED
|
||||
user.state = User.STATE_DISABLED
|
||||
user.save()
|
||||
|
|
Loading…
Reference in a new issue