Removed hardcorded year value and implemented a check for current year instead

This commit is contained in:
hubcaps 2017-05-26 22:00:31 -07:00 committed by evilhero
parent c4b12b21cd
commit 74bfca41a7
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
<%inherit file="base.html" />
<%!
import datetime
import mylar
from mylar.helpers import checked
@ -66,7 +67,8 @@
%if searchresults:
%for result in searchresults:
<%
if result['comicyear'] == '2016':
now = datetime.datetime.now()
if result['comicyear'] == now.year:
grade = 'A'
else:
grade = 'Z'