mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Only report local users in user count
This commit is contained in:
parent
1b50e83c95
commit
3ba02f8fbd
1 changed files with 3 additions and 1 deletions
|
@ -58,15 +58,17 @@ def nodeinfo(request):
|
|||
return HttpResponseNotFound()
|
||||
|
||||
status_count = models.Status.objects.filter(user__local=True).count()
|
||||
user_count = models.User.objects.count()
|
||||
user_count = models.User.objects.filter(local=True).count()
|
||||
|
||||
month_ago = datetime.now() - relativedelta(months=1)
|
||||
last_month_count = models.User.objects.filter(
|
||||
local=True,
|
||||
last_active_date__gt=month_ago
|
||||
).count()
|
||||
|
||||
six_months_ago = datetime.now() - relativedelta(months=6)
|
||||
six_month_count = models.User.objects.filter(
|
||||
local=True,
|
||||
last_active_date__gt=six_months_ago
|
||||
).count()
|
||||
return JsonResponse({
|
||||
|
|
Loading…
Reference in a new issue