fix: avoid error in product search for duplicated key

This commit is contained in:
Lance Edgar 2024-11-20 20:16:06 -06:00
parent 7171c7fb06
commit aace6033c5

View file

@ -1857,7 +1857,8 @@ class ProductView(MasterView):
lookup_fields.append('alt_code') lookup_fields.append('alt_code')
if lookup_fields: if lookup_fields:
product = self.products_handler.locate_product_for_entry( product = self.products_handler.locate_product_for_entry(
session, term, lookup_fields=lookup_fields) session, term, lookup_fields=lookup_fields,
first_if_multiple=True)
if product: if product:
final_results.append(self.search_normalize_result(product)) final_results.append(self.search_normalize_result(product))