more recipe search tests

This commit is contained in:
smilerz
2022-02-13 13:53:07 -06:00
parent baa2aa51da
commit bf54680178
10 changed files with 408 additions and 102 deletions

View File

@ -37,6 +37,7 @@ def update_recipe_search_vector(sender, instance=None, created=False, **kwargs):
if SQLITE:
return
language = DICTIONARY.get(translation.get_language(), 'simple')
# these indexed fields are space wide, reading user preferences would lead to inconsistent behavior
instance.name_search_vector = SearchVector('name__unaccent', weight='A', config=language)
instance.desc_search_vector = SearchVector('description__unaccent', weight='C', config=language)
try: