From 6a2c27749f511956c4d0a6da283e6207acf3313b Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 23 Mar 2021 13:58:16 -0500 Subject: [PATCH] updated links to import recipes --- cookbook/helper/recipe_url_import.py | 3 +++ cookbook/templates/base.html | 2 +- cookbook/templates/index.html | 2 +- cookbook/templates/url_import.html | 16 +++++++++++----- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cookbook/helper/recipe_url_import.py b/cookbook/helper/recipe_url_import.py index 495c2220..1b0828d4 100644 --- a/cookbook/helper/recipe_url_import.py +++ b/cookbook/helper/recipe_url_import.py @@ -330,6 +330,9 @@ def parse_image(image): image = pic elif 'url' in pic: image = pic['url'] + elif type(image) == dict: + if 'url' in image: + image = image['url'] # ignore relative image paths if image[:4] != 'http': diff --git a/cookbook/templates/base.html b/cookbook/templates/base.html index 3304a675..b0b49cfb 100644 --- a/cookbook/templates/base.html +++ b/cookbook/templates/base.html @@ -121,7 +121,7 @@ class="fas fa-chart-line fa-fw"> {% trans 'Statistics' %} {% trans 'Units & Ingredients' %} - {% trans 'Import Recipe' %} diff --git a/cookbook/templates/index.html b/cookbook/templates/index.html index 069b27bf..47997e7d 100644 --- a/cookbook/templates/index.html +++ b/cookbook/templates/index.html @@ -44,7 +44,7 @@ class="fas fa-plus-circle fa-fw"> {% trans 'New Recipe' %}