From: yomguy Date: Wed, 12 Dec 2012 11:10:23 +0000 (+0100) Subject: fix 0 total_progress X-Git-Tag: 0.9-probarreau~262 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=8f89b524cb327d2de44fca91ab0e261dc146dd18;p=teleforma.git fix 0 total_progress --- diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index 4f7e5905..246b387d 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -81,7 +81,10 @@ def seminar_progress(user, seminar): if answer: progress += question.weight - return 100-int(progress*100/total) + if total != 0: + return 100-int(progress*100/total) + else: + return 100 def total_progress(user):