misc: makes sure category id works as strings in backoffice

This commit is contained in:
Frédéric Péters 2015-01-19 15:25:17 +01:00
parent c9ca13fe9a
commit 0ba646c000
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ class FormsDirectory(AccessControlled, Directory):
cats = Category.select(order_by = 'name')
lists = []
for c in cats:
t = [x for x in l if x.category_id == c.id]
t = [x for x in l if str(x.category_id) == str(c.id)]
if t:
lists.append((c.name, t))
t = [x for x in l if x.category_id is None]