Experiment: Use width*height instead of area column when searching.

Will see if this has any adverse effects, or if it goes well I can
remove the area and ratio columns.
This commit is contained in:
voussoir 2020-09-08 21:59:42 -07:00
parent c507d5f629
commit 7eb095e17c

View file

@ -334,6 +334,12 @@ def normalize_orderby(orderby, warning_bag=None):
if column == 'random':
column = 'RANDOM()'
elif column == 'area':
column = 'width * height'
elif column == 'ratio':
column = 'width / height'
if direction not in ('asc', 'desc'):
message = constants.WARNING_ORDERBY_BADDIRECTION.format(
column=column,