mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
fixed keyword import error
This commit is contained in:
@@ -409,7 +409,7 @@ def parse_keywords(keyword_json, space):
|
|||||||
# retrieve keyword automation cache if it exists, otherwise build from database
|
# retrieve keyword automation cache if it exists, otherwise build from database
|
||||||
KEYWORD_CACHE_KEY = f'automation_keyword_alias_{space.pk}'
|
KEYWORD_CACHE_KEY = f'automation_keyword_alias_{space.pk}'
|
||||||
if c := caches['default'].get(KEYWORD_CACHE_KEY, None):
|
if c := caches['default'].get(KEYWORD_CACHE_KEY, None):
|
||||||
self.food_aliases = c
|
keyword_aliases = c
|
||||||
caches['default'].touch(KEYWORD_CACHE_KEY, 30)
|
caches['default'].touch(KEYWORD_CACHE_KEY, 30)
|
||||||
else:
|
else:
|
||||||
for a in Automation.objects.filter(space=space, disabled=False, type=Automation.KEYWORD_ALIAS).only('param_1', 'param_2').order_by('order').all():
|
for a in Automation.objects.filter(space=space, disabled=False, type=Automation.KEYWORD_ALIAS).only('param_1', 'param_2').order_by('order').all():
|
||||||
|
|||||||
Reference in New Issue
Block a user