Mercurial > hg > rlgallery-misc
changeset 5:a583700c0ca4
web/archive.cgi: fix backward comparisons.
Some form-printing code was using != instead of ==, which led to the
date defaulting to today whenever it was specified.
author | John "Elwin" Edwards <elwin@sdf.org> |
---|---|
date | Sun, 19 Aug 2012 15:26:18 -0700 |
parents | f5a37cc7f41f |
children | 4778ab7de7aa |
files | web/archive.cgi |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/web/archive.cgi Thu Jul 26 10:14:56 2012 -0700 +++ b/web/archive.cgi Sun Aug 19 15:26:18 2012 -0700 @@ -56,11 +56,11 @@ sstr = '<div>Date: <select name="year">\n' # Default to today now = datetime.now(rlgall.utc) - if dvals[0] != None: + if dvals[0] == None: dvals[0] = now.year - if dvals[1] != None: + if dvals[1] == None: dvals[1] = now.month - if dvals[2] != None: + if dvals[2] == None: dvals[2] = now.day for year in range(2010, now.year + 1): if year == dvals[0]: