fix error al crear producto sin tener ninguna cateegoría pública definida
This commit is contained in:
parent
3a0a965589
commit
50f2a6d592
1 changed files with 2 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ class ProductProduct(models.Model):
|
||||||
#check if there are public categories setup by user
|
#check if there are public categories setup by user
|
||||||
new_cats = []
|
new_cats = []
|
||||||
old_cats = vals.get("public_categ_ids")
|
old_cats = vals.get("public_categ_ids")
|
||||||
|
if old_cats:
|
||||||
if old_cats[0][2]:
|
if old_cats[0][2]:
|
||||||
for i in old_cats[0][2]:
|
for i in old_cats[0][2]:
|
||||||
new_cats.append(i)
|
new_cats.append(i)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue