One annoying possibility in Satchmo is that administrators sometimes accidentally set a category as its own parent. This causes an infinite loop and hangs the site. So you can’t even use Django to fix the error.
Luckily, the solution is simple. At the commandline do like so:
/opt/webapps/mystore $ ./manage.py dbshell
mysql> update product_category set parent_id=null where id=parent_id;
mysql> quit
Problem solved.
Technorati Tags: satchmo, django
















1 response so far ↓
1 Kyle // Jun 3, 2008 at 12:01 pm
I had a similar problem with Pages in our CMS — you could assign a page’s parent to be itself.
The more preemptive solution we decided on was to simply override save(), and set `parent = None` if self.parent = self.
Leave a Comment