Comment 4 for bug 1091184

Revision history for this message
Ronald Portier (Therp) (rportier1962) wrote :

Hello Jignesh,

As far as I can see, your import links to subcategories of the main category.

But the error specifically occurs when there are no categories under the main category yet. That is when the parent_left of the main (and only) existing category will be NULL in the database, and None when retrieved through the cr cursor.

So to reproduce: start with an empty database and make sure parent left and right have not been set:

test_db=# select id, parent_left, parent_right, name, parent_id from product_category:

 id | parent_left | parent_right | name | parent_id
----+-------------+--------------+--------------+-----------
  1 | | | All products |
(1 row)

Kind regards,

Ronald