Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gfcapalbo committed Sep 29, 2016
1 parent b739484 commit 844e862
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions magentoerpconnect/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,11 @@ def categories(self, record):
# OpenERP assign 'All Products' if not specified
# skip main cat assignment if the current main category is already in
# categ_ids
if (main_categ_id and
self.backend_record.categ_id.id not in category_ids):
result['categ_id'] = main_categ_id
if main_categ_id:
if self.backend_record.categ_id.id not in category_ids):
result['categ_id'] = main_categ_id
else:
result['categ_id'] = self.backend_record.categ_id.id
return result

@mapping
Expand Down

0 comments on commit 844e862

Please sign in to comment.