From ae2126e82687248951d31117afd518c5d93222b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Caux?= <git@jscaux.org> Date: Wed, 20 Mar 2024 17:41:07 +0100 Subject: [PATCH] Only allow recalculation of PubFracs for published papers --- .../finances/management/commands/recalculate_pubfracs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scipost_django/finances/management/commands/recalculate_pubfracs.py b/scipost_django/finances/management/commands/recalculate_pubfracs.py index 3a5186d8b..51ec292f0 100644 --- a/scipost_django/finances/management/commands/recalculate_pubfracs.py +++ b/scipost_django/finances/management/commands/recalculate_pubfracs.py @@ -11,5 +11,5 @@ class Command(BaseCommand): help = "Recalculates PubFracs for all publications" def handle(self, *args, **kwargs): - for pub in Publication.objects.all(): + for pub in Publication.objects.published(): pub.recalculate_pubfracs() -- GitLab