Commits

tjama committed f5ad1c6

fixes

  • Participants
  • Parent commits d55cdd4

Comments (0)

Files changed (1)

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