From d909435f1fa5c86d80f03c73f3867df23866c50b Mon Sep 17 00:00:00 2001 From: evilhero Date: Thu, 2 Mar 2017 12:49:09 -0500 Subject: [PATCH] FIX:(#1583) Fix for errant have total sorting on main page --- data/interfaces/default/index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/data/interfaces/default/index.html b/data/interfaces/default/index.html index 8e25c6e8..d58eefea 100755 --- a/data/interfaces/default/index.html +++ b/data/interfaces/default/index.html @@ -2,6 +2,7 @@ <%! from mylar import helpers, db import datetime + import decimal %> <%def name="body()"> @@ -36,7 +37,13 @@ hissues = 0 else: hissues = comic['haveissues'] - comic_percent = comic['percent'] + hissues + + if any([comic['totalissues'] == 'None', comic['totalissues'] is None]): + tissues = 0 + else: + tissues = comic['totalissues'] + + comic_percent = int(hissues) + decimal.Decimal(tissues) / decimal.Decimal('1000') if comic['Status'] == 'Paused': grade = 'X'