Skip to content

Commit

Permalink
case insenstitive import
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Mar 18, 2020
1 parent 97e2593 commit 1b45121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cookbook/provider/dropbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
2 changes: 1 addition & 1 deletion cookbook/provider/nextcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1b45121

Please sign in to comment.