fixed nextcloud image import

This commit is contained in:
vabene1111 2021-11-07 22:19:46 +01:00
parent 301f1cede4
commit fd8752b298

View File

@ -53,7 +53,7 @@ class NextcloudCookbook(Integration):
if '.zip' in f['name']:
import_zip = ZipFile(f['file'])
for z in import_zip.filelist:
if re.match(f'^Recipes/{recipe.name}/full.jpg$', z.filename):
if re.match(f'^{recipe.name}/full.jpg$', z.filename):
self.import_recipe_image(recipe, BytesIO(import_zip.read(z.filename)), filetype=get_filetype(z.filename))
return recipe