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:
		
							parent
							
								
									c507d5f629
								
							
						
					
					
						commit
						7eb095e17c
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -334,6 +334,12 @@ def normalize_orderby(orderby, warning_bag=None): | ||||||
|         if column == 'random': |         if column == 'random': | ||||||
|             column = 'RANDOM()' |             column = 'RANDOM()' | ||||||
| 
 | 
 | ||||||
|  |         elif column == 'area': | ||||||
|  |             column = 'width * height' | ||||||
|  | 
 | ||||||
|  |         elif column == 'ratio': | ||||||
|  |             column = 'width / height' | ||||||
|  | 
 | ||||||
|         if direction not in ('asc', 'desc'): |         if direction not in ('asc', 'desc'): | ||||||
|             message = constants.WARNING_ORDERBY_BADDIRECTION.format( |             message = constants.WARNING_ORDERBY_BADDIRECTION.format( | ||||||
|                 column=column, |                 column=column, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue