fix for history admin crashing when company is null

This commit is contained in:
Sam
2021-03-10 11:41:02 +00:00
parent aa9a6bdf81
commit d01d5bf407
4 changed files with 14 additions and 10 deletions

View File

@@ -85,7 +85,7 @@ def extract_search_filters(result_set):
return filter_dict
def find_related_products_v7(description, tags, attributes, category):
def get_related_products(description, tags, attributes, category):
products_qs = Product.objects.filter(
description=description,
tags__in=tags,
@@ -94,7 +94,7 @@ def find_related_products_v7(description, tags, attributes, category):
)[:6]
return products_qs
'''
def find_related_products_v3(keyword):
"""
Ranked product search
@@ -111,9 +111,9 @@ def find_related_products_v3(keyword):
).filter(rank__gt=0.05) # removed order_by because its lost in casting
return set(products_qs)
'''
def find_related_products_v6(keyword, shipping_cost=None, discount=None, category=None, tags=None, price_min=None,price_max=None):
def ranked_product_search(keyword, shipping_cost=None, discount=None, category=None, tags=None, price_min=None,price_max=None):
"""
Ranked product search