fix UPC search in products screen
This commit is contained in:
parent
352f32ff5e
commit
c76e3242fc
|
@ -97,7 +97,7 @@ class ProductsGrid(SearchableAlchemyGridView):
|
|||
except ValueError:
|
||||
return q
|
||||
else:
|
||||
return q.filter(field == v) if v else q
|
||||
return q.filter(rattail.Product.upc == v) if v else q
|
||||
|
||||
def filter_not(q, v):
|
||||
try:
|
||||
|
@ -105,7 +105,7 @@ class ProductsGrid(SearchableAlchemyGridView):
|
|||
except ValueError:
|
||||
return q
|
||||
else:
|
||||
return q.filter(field != v) if v else q
|
||||
return q.filter(rattail.Product.upc != v) if v else q
|
||||
|
||||
return {'is': filter_is, 'nt': filter_not}
|
||||
|
||||
|
|
Loading…
Reference in a new issue