Remove double product with multiple backends

This commit is contained in:
Florent 2012-11-12 10:28:42 +01:00 committed by Romain Bignon
commit 66545b23c6

View file

@ -92,7 +92,13 @@ class Comparoob(ReplApplication):
def do_prices(self, pattern):
products = []
for backend, product in self.do('search_products', pattern):
products.append(product)
double = False
for prod in products:
if product.name == prod.name:
double = True
break
if not double:
products.append(product)
product = None
if len(products) == 0: