Remove double product with multiple backends
This commit is contained in:
parent
c838b91fb2
commit
66545b23c6
1 changed files with 7 additions and 1 deletions
|
|
@ -92,7 +92,13 @@ class Comparoob(ReplApplication):
|
||||||
def do_prices(self, pattern):
|
def do_prices(self, pattern):
|
||||||
products = []
|
products = []
|
||||||
for backend, product in self.do('search_products', pattern):
|
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
|
product = None
|
||||||
if len(products) == 0:
|
if len(products) == 0:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue