From cc6f393a861a6a3d0938e7e4c337f32b765f1d41 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sun, 6 Jul 2025 15:59:54 +0200 Subject: [PATCH] fixed open data food import with missing category --- cookbook/helper/open_data_importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/helper/open_data_importer.py b/cookbook/helper/open_data_importer.py index 28f1e22d2..0ffa1ccb4 100644 --- a/cookbook/helper/open_data_importer.py +++ b/cookbook/helper/open_data_importer.py @@ -341,7 +341,7 @@ class OpenDataImporter: obj_dict = { 'name': self.data[datatype][k]['name'], 'plural_name': self.data[datatype][k]['plural_name'] if self.data[datatype][k]['plural_name'] != '' else None, - 'supermarket_category_id': self.slug_id_cache['category'][self.data[datatype][k]['store_category']], + 'supermarket_category_id': self.slug_id_cache['category'][self.data[datatype][k]['store_category']] if self.data[datatype][k]['store_category'] in self.slug_id_cache['category'] else None, 'fdc_id': re.sub(r'\D', '', self.data[datatype][k]['fdc_id']) if self.data[datatype][k]['fdc_id'] != '' else None, 'open_data_slug': k, 'properties_food_unit_id': None,