Fix duplicate aliases being written
This commit is contained in:
parent
2d250ef008
commit
3f9cb3093c
1 changed files with 2 additions and 2 deletions
|
@ -94,8 +94,8 @@ def update_product_pricings(src):
|
||||||
lines_out.append(line)
|
lines_out.append(line)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
human_aliases = sorted(set(product.aliases) - set([prod_info.gtin]) - set(prod_info.aliases))
|
aliases = sorted(set(product.aliases) - {prod_info.gtin})
|
||||||
product.aliases = [prod_info.gtin, *prod_info.aliases, *human_aliases]
|
product.aliases = [prod_info.gtin, *aliases]
|
||||||
|
|
||||||
# Apply profit margin and divide by the number of units per sold packaging.
|
# Apply profit margin and divide by the number of units per sold packaging.
|
||||||
unit_price = prod_info.price * profit_margin / prod_info.units
|
unit_price = prod_info.price * profit_margin / prod_info.units
|
||||||
|
|
Loading…
Add table
Reference in a new issue