mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove ambiguous unit "cup"
The DFC doesn't actually specify which cup it means. I don't expect anyone providing "cup" as unit to measure their produce and expect it to calculate as a regular volume. It can just be seen as items.
This commit is contained in:
@@ -41,7 +41,6 @@ class WeightsAndMeasures
|
||||
1.0 => { 'name' => 'L', 'system' => 'metric' },
|
||||
1000.0 => { 'name' => 'kL', 'system' => 'metric' },
|
||||
|
||||
0.25 => { 'name' => 'cu', 'system' => 'imperial' },
|
||||
4.54609 => { 'name' => 'gal', 'system' => 'imperial' },
|
||||
}
|
||||
}.freeze
|
||||
|
||||
@@ -80,10 +80,6 @@ class QuantitativeValueBuilder < DfcBuilder
|
||||
["volume", nil, 0.01]
|
||||
when quantity_unit.DECILITRE
|
||||
["volume", nil, 0.1]
|
||||
when quantity_unit.CUP
|
||||
# Interpreted as metric cup, not US legal cup.
|
||||
# https://github.com/datafoodconsortium/taxonomies/issues/8
|
||||
["volume", nil, 0.25]
|
||||
when quantity_unit.GALLON
|
||||
["volume", nil, 4.54609]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user