Skip to content

Commit 1b45121

Browse files
committed
case insenstitive import
1 parent 97e2593 commit 1b45121

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cookbook/provider/dropbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def import_all(monitor):
3535
import_count = 0
3636
for recipe in recipes['entries']: # TODO check if has_more is set and import that as well
3737
path = recipe['path_lower']
38-
if not Recipe.objects.filter(file_path=path).exists() and not RecipeImport.objects.filter(
38+
if not Recipe.objects.filter(file_path__iexact=path).exists() and not RecipeImport.objects.filter(
3939
file_path=path).exists():
4040
name = os.path.splitext(recipe['name'])[0]
4141
new_recipe = RecipeImport(name=name, file_path=path, storage=monitor.storage, file_uid=recipe['id'])

cookbook/provider/nextcloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def import_all(monitor):
3232
import_count = 0
3333
for file in files:
3434
path = monitor.path + '/' + file
35-
if not Recipe.objects.filter(file_path=path).exists() and not RecipeImport.objects.filter(
35+
if not Recipe.objects.filter(file_path__iexact=path).exists() and not RecipeImport.objects.filter(
3636
file_path=path).exists():
3737
name = os.path.splitext(file)[0]
3838
new_recipe = RecipeImport(name=name, file_path=path, storage=monitor.storage)

0 commit comments

Comments
 (0)