From: Yoan Le Clanche Date: Wed, 12 Nov 2025 08:39:15 +0000 (+0100) Subject: Fix duration computation for testimonial award X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=1ef0b5ec7a29f0a7d047357b46a5d5b12953b33b;p=teleforma.git Fix duration computation for testimonial award --- diff --git a/teleforma/management/commands/teleforma-revisions-from-bbb.py b/teleforma/management/commands/teleforma-revisions-from-bbb.py index e0abe432..6271a8fe 100644 --- a/teleforma/management/commands/teleforma-revisions-from-bbb.py +++ b/teleforma/management/commands/teleforma-revisions-from-bbb.py @@ -117,7 +117,8 @@ class Command(BaseCommand): for revision in revisions: total_spent += revision.delta() - required_duration = conf.duration.as_seconds() * 0.9 + required_duration = (conf.date_end - conf.date_begin).total_seconds() * 0.9 + # print("Required duration: %d seconds" % required_duration) # print("Total spent: %d seconds" % total_spent.total_seconds()) if total_spent.total_seconds() >= required_duration: