Commits

tjama committed 59792b0

fixes

  • Participants
  • Parent commits c117191

Comments (0)

Files changed (1)

             if total > 0:
                 stats['avgpts'] = '%.2f' % db.get("SELECT avg(CAST(points as integer)) FROM namethatanime_questionlog WHERE user_id = %s;", (user.id,)).avg
                 stats['avgtime'] = '%.2f' % db.get("SELECT avg(CAST(anstime as integer)) FROM namethatanime_questionlog WHERE user_id = %s;", (user.id,)).avg            
-                stats['corpercent'] = "{:.0%}".format(float(stats['correct']) / float(total))
+                stats['corpercent'] = "{0:.0%}".format(float(stats['correct']) / float(total))
             else:
                 stats['avgpts'] = 0
                 stats['avgtime'] = 0