updated to handle sqlite

This commit is contained in:
smilerz
2021-04-11 17:01:18 -05:00
parent b741d827b3
commit 43d223cf02
5 changed files with 19 additions and 13 deletions

View File

@ -10,12 +10,13 @@ def update_recipe_search_vector(sender, instance=None, created=False, **kwargs):
if not instance:
return
# needed to ensure search vector update doesn't trigger recursion
if hasattr(instance, '_dirty'):
return
instance.search_vector = (
SearchVector('name', weight='A', config='english')
+ SearchVector('description', weight='B', config='english')
+ SearchVector('description', weight='C', config='english')
)
try: