added file id

This commit is contained in:
vabene1111
2018-06-06 23:05:22 +02:00
parent cb246a33d8
commit 2e2144a9e3
8 changed files with 145 additions and 6 deletions

View File

@ -33,7 +33,7 @@ def import_all(monitor):
path = recipe['path_lower']
if not Recipe.objects.filter(path=path).exists() and not RecipeImport.objects.filter(path=path).exists():
name = os.path.splitext(recipe['name'])[0]
new_recipe = RecipeImport(name=name, path=path, storage=monitor.storage)
new_recipe = RecipeImport(name=name, path=path, storage=monitor.storage, file_uid=recipe['id'])
new_recipe.save()
import_count += 1