delete_realm: Use Message.realm column for message count.

This commit is contained in:
Mateusz Mandera 2022-10-29 21:51:17 +02:00 committed by Tim Abbott
parent 601f0677f3
commit ebc144896f
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ realms used for testing; consider using deactivate_realm instead."""
is_bot=False,
).count()
message_count = Message.objects.filter(sender__realm=realm).count()
message_count = Message.objects.filter(realm=realm).count()
print(f"This realm has {user_count} users and {message_count} messages.\n")