diff --git a/cookbook/helper/recipe_search.py b/cookbook/helper/recipe_search.py index 745c37a78..190caad73 100644 --- a/cookbook/helper/recipe_search.py +++ b/cookbook/helper/recipe_search.py @@ -115,7 +115,7 @@ def search_recipes(request, queryset, params): ) queryset = queryset.filter(query_filter).annotate(rank=search_rank) else: - queryset = queryset.filter(query_filter) + queryset = queryset.filter(name__icontains=search_string) if len(search_keywords) > 0: if search_keywords_or == 'true': diff --git a/cookbook/integration/integration.py b/cookbook/integration/integration.py index b7ee9f29d..2a37da598 100644 --- a/cookbook/integration/integration.py +++ b/cookbook/integration/integration.py @@ -31,11 +31,12 @@ class Integration: """ self.request = request self.export_type = export_type - self.keyword = Keyword.objects.create( + # TODO add all import keywords under the importer root node + self.keyword = Keyword.add_root( name=f'Import {export_type} {date_format(datetime.datetime.now(), "DATETIME_FORMAT")}.{datetime.datetime.now().strftime("%S")}', description=f'Imported by {request.user.get_user_name()} at {date_format(datetime.datetime.now(), "DATETIME_FORMAT")}. Type: {export_type}', icon='📥', - space=request.space + space=request.space, ) def do_export(self, recipes):