correctly remove root from the category path
This commit is contained in:
@@ -16,7 +16,7 @@ class Category(db.Model):
|
|||||||
if not row:
|
if not row:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
'Could not find a path for category: {}, locale: {}'.format(self.id, locale))
|
'Could not find a path for category: {}, locale: {}'.format(self.id, locale))
|
||||||
path = row.path.replace('rot/', '', 1)
|
path = row.path.split('/', 1)[-1] # get all text after the first /
|
||||||
path = slugify(path)
|
path = slugify(path)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user