Merge branch 'develop' into feature/unit-conversion

# Conflicts:
#	cookbook/helper/recipe_url_import.py
This commit is contained in:
vabene1111
2023-05-26 16:11:11 +02:00
2 changed files with 9 additions and 9 deletions

View File

@@ -202,7 +202,7 @@ def get_from_scraper(scrape, request):
traceback.print_exc()
pass
if recipe_json['source_url']:
if 'source_url' in recipe_json and recipe_json['source_url']:
automations = Automation.objects.filter(type=Automation.INSTRUCTION_REPLACE, space=request.space, disabled=False).only('param_1', 'param_2', 'param_3').order_by('order').all()[:512]
for a in automations:
if re.match(a.param_1, (recipe_json['source_url'])[:512]):