mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-17 11:54:22 +01:00
(bug) undefined method privileged? for nil:Class
This commit is contained in:
parent
040f74a2fe
commit
e217f61524
@ -111,7 +111,7 @@ class ProductService
|
||||
end
|
||||
|
||||
def filter_by_stock(products, filters, operator)
|
||||
return products if filters[:stock_type] == 'internal' && !operator.privileged?
|
||||
return products if filters[:stock_type] == 'internal' && !operator&.privileged?
|
||||
|
||||
if filters[:stock_from].to_i.positive?
|
||||
products = products.where('(stock ->> ?)::int >= ?', filters[:stock_type], filters[:stock_from])
|
||||
|
Loading…
x
Reference in New Issue
Block a user