mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Weight only returned for products whose variant_unit is 'weight'
This commit is contained in:
@@ -57,7 +57,7 @@ module OpenFoodNetwork
|
||||
end
|
||||
|
||||
def weight_from_unit_value
|
||||
(unit_value || 0) / 1000
|
||||
(unit_value || 0) / 1000 if self.product.variant_unit == 'weight'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user