fix UPC search in products screen
This commit is contained in:
parent
352f32ff5e
commit
c76e3242fc
|
@ -97,7 +97,7 @@ class ProductsGrid(SearchableAlchemyGridView):
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return q
|
return q
|
||||||
else:
|
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):
|
def filter_not(q, v):
|
||||||
try:
|
try:
|
||||||
|
@ -105,7 +105,7 @@ class ProductsGrid(SearchableAlchemyGridView):
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return q
|
return q
|
||||||
else:
|
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}
|
return {'is': filter_is, 'nt': filter_not}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue