]> git.parisson.com Git - teleforma.git/commitdiff
fix 0 total_progress
authoryomguy <yomguy@parisson.com>
Wed, 12 Dec 2012 11:10:23 +0000 (12:10 +0100)
committeryomguy <yomguy@parisson.com>
Wed, 12 Dec 2012 11:10:23 +0000 (12:10 +0100)
teleforma/views/pro.py

index 4f7e5905934f885956fefbb5233051e4d8fea0ec..246b387d365841e10cc3168d6dcabb2b3d60a464 100644 (file)
@@ -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):