Use None check instead of general falsey for minmax

This commit is contained in:
voussoir 2017-03-23 15:17:19 -07:00
parent b69ef8ea00
commit 5ee6062cad

View file

@ -825,14 +825,16 @@ class PDBPhotoMixin:
continue continue
if any( if any(
not fetch[constants.SQL_PHOTO[key]] or fetch[constants.SQL_PHOTO[key]] > value fetch[constants.SQL_PHOTO[key]] is None or
fetch[constants.SQL_PHOTO[key]] > value
for (key, value) in maximums.items() for (key, value) in maximums.items()
): ):
#print('Failed maximums') #print('Failed maximums')
continue continue
if any( if any(
not fetch[constants.SQL_PHOTO[key]] or fetch[constants.SQL_PHOTO[key]] < value fetch[constants.SQL_PHOTO[key]] is None or
fetch[constants.SQL_PHOTO[key]] < value
for (key, value) in minimums.items() for (key, value) in minimums.items()
): ):
#print('Failed minimums') #print('Failed minimums')