mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-19 22:42:17 +00:00
Tweak awaiting approval count to better ignore inactive users
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import datetime
|
||||
import hashlib
|
||||
import random
|
||||
import string
|
||||
@@ -77,7 +76,7 @@ class Profile(AbstractUser):
|
||||
@classmethod
|
||||
def users_awaiting_approval_count(cls):
|
||||
# last_login = None ensures we only pick up genuinely new users, not those that have been deactivated for inactivity
|
||||
return Profile.objects.filter(is_approved=False, last_login=None).count()
|
||||
return Profile.objects.filter(is_approved=False, last_login=None, date_joined_date=timezone.now().date()).count()
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
Reference in New Issue
Block a user