From 9a8049f71bc0d9ba1697a89366a3afe92788e5f7 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Thu, 20 May 2021 11:17:45 +0200 Subject: [PATCH] fixed nextcloud importer ignoring certain recipes --- cookbook/integration/nextcloud_cookbook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/integration/nextcloud_cookbook.py b/cookbook/integration/nextcloud_cookbook.py index 6857032a..ae47b2df 100644 --- a/cookbook/integration/nextcloud_cookbook.py +++ b/cookbook/integration/nextcloud_cookbook.py @@ -11,7 +11,7 @@ from cookbook.models import Recipe, Step, Food, Unit, Ingredient class NextcloudCookbook(Integration): def import_file_name_filter(self, zip_info_object): - return re.match(r'^Recipes/([A-Za-z\d\s])+/recipe.json$', zip_info_object.filename) + return zip_info_object.filename.endswith('.json') def get_recipe_from_file(self, file): recipe_json = json.loads(file.getvalue().decode("utf-8"))