From 427d806b1386b664edb1f18a2b1cf98c69f8a2e2 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 31 Aug 2023 16:11:50 +1000 Subject: [PATCH] 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. --- app/services/weights_and_measures.rb | 1 - .../dfc_provider/app/services/quantitative_value_builder.rb | 4 ---- 2 files changed, 5 deletions(-) diff --git a/app/services/weights_and_measures.rb b/app/services/weights_and_measures.rb index 79da11cf52..ada5523e22 100644 --- a/app/services/weights_and_measures.rb +++ b/app/services/weights_and_measures.rb @@ -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 diff --git a/engines/dfc_provider/app/services/quantitative_value_builder.rb b/engines/dfc_provider/app/services/quantitative_value_builder.rb index 9903aa5965..0ddd47cea1 100644 --- a/engines/dfc_provider/app/services/quantitative_value_builder.rb +++ b/engines/dfc_provider/app/services/quantitative_value_builder.rb @@ -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]