diff --git a/users/management/commands/refresh_mastodon.py b/users/management/commands/refresh_mastodon.py index c1609a4b..c5aca43d 100644 --- a/users/management/commands/refresh_mastodon.py +++ b/users/management/commands/refresh_mastodon.py @@ -9,7 +9,7 @@ class Command(BaseCommand): def handle(self, *args, **options): count = 0 - for user in User.objects.filter(mastodon_last_refresh__lt=timezone.now() - timedelta(hours=24)): + for user in User.objects.filter(mastodon_last_refresh__lt=timezone.now() - timedelta(hours=24), is_active=True): if user.mastodon_token: print(f"Refreshing {user}") if user.refresh_mastodon_data():