From 523a2b41d133f3c242b015df647eff5036654605 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Tue, 19 Jan 2021 21:11:02 +0100 Subject: [PATCH] fixed keyboard import edit --- cookbook/helper/recipe_url_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/helper/recipe_url_import.py b/cookbook/helper/recipe_url_import.py index 4a9c7f0d7..11743f627 100644 --- a/cookbook/helper/recipe_url_import.py +++ b/cookbook/helper/recipe_url_import.py @@ -139,7 +139,7 @@ def find_recipe_json(ld_json, url): if k := Keyword.objects.filter(name=kw).first(): keywords.append({'id': str(k.id), 'text': str(k).strip()}) else: - keywords.append({'id': "null", 'text': kw.strip()}) + keywords.append({'id': random.randrange(0, 9999999, 1), 'text': kw.strip()}) ld_json['keywords'] = keywords else: