From 1b451213850933c4eef8ee51de9f36ac25792199 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Wed, 18 Mar 2020 16:58:27 +0100 Subject: [PATCH] case insenstitive import --- cookbook/provider/dropbox.py | 2 +- cookbook/provider/nextcloud.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/provider/dropbox.py b/cookbook/provider/dropbox.py index 0782c1339a..0a283ecaaa 100644 --- a/cookbook/provider/dropbox.py +++ b/cookbook/provider/dropbox.py @@ -35,7 +35,7 @@ def import_all(monitor): import_count = 0 for recipe in recipes['entries']: # TODO check if has_more is set and import that as well path = recipe['path_lower'] - if not Recipe.objects.filter(file_path=path).exists() and not RecipeImport.objects.filter( + if not Recipe.objects.filter(file_path__iexact=path).exists() and not RecipeImport.objects.filter( file_path=path).exists(): name = os.path.splitext(recipe['name'])[0] new_recipe = RecipeImport(name=name, file_path=path, storage=monitor.storage, file_uid=recipe['id']) diff --git a/cookbook/provider/nextcloud.py b/cookbook/provider/nextcloud.py index 2c36ff4d71..705c72807c 100644 --- a/cookbook/provider/nextcloud.py +++ b/cookbook/provider/nextcloud.py @@ -32,7 +32,7 @@ def import_all(monitor): import_count = 0 for file in files: path = monitor.path + '/' + file - if not Recipe.objects.filter(file_path=path).exists() and not RecipeImport.objects.filter( + if not Recipe.objects.filter(file_path__iexact=path).exists() and not RecipeImport.objects.filter( file_path=path).exists(): name = os.path.splitext(file)[0] new_recipe = RecipeImport(name=name, file_path=path, storage=monitor.storage)