diff --git a/categories/models.py b/categories/models.py index 372b760..bb928ae 100644 --- a/categories/models.py +++ b/categories/models.py @@ -54,7 +54,8 @@ class Category(models.Model): ancestors = self.get_ancestors() return ' > '.join([force_unicode(i.name) for i in ancestors]+[self.name,]) -mptt.register(Category, order_insertion_by=['name']) +try: mptt.register(Category, order_insertion_by=['name']) +except: pass if RELATION_MODELS: category_relation_limits = reduce(lambda x,y: x|y, RELATIONS)