misc: makes sure category id works as strings (#6238)
This commit is contained in:
parent
a1f6b2fe0f
commit
bb495a1fcd
|
@ -981,7 +981,7 @@ class AlternateRootDirectory(OldRootDirectory):
|
||||||
if category.url_name == 'consultations':
|
if category.url_name == 'consultations':
|
||||||
self.consultations_category = category
|
self.consultations_category = category
|
||||||
continue
|
continue
|
||||||
formdefs = [x for x in all_formdefs if x.category_id == category.id]
|
formdefs = [x for x in all_formdefs if str(x.category_id) == str(category.id)]
|
||||||
formdefs_advertise = []
|
formdefs_advertise = []
|
||||||
|
|
||||||
for formdef in formdefs[:]:
|
for formdef in formdefs[:]:
|
||||||
|
@ -1040,7 +1040,7 @@ class AlternateRootDirectory(OldRootDirectory):
|
||||||
return
|
return
|
||||||
consultations_category = cats[0]
|
consultations_category = cats[0]
|
||||||
formdefs = FormDef.select(lambda x: (
|
formdefs = FormDef.select(lambda x: (
|
||||||
x.category_id == consultations_category.id and
|
str(x.category_id) == str(consultations_category.id) and
|
||||||
(not x.is_disabled() or x.disabled_redirection)),
|
(not x.is_disabled() or x.disabled_redirection)),
|
||||||
order_by = 'name')
|
order_by = 'name')
|
||||||
if not formdefs:
|
if not formdefs:
|
||||||
|
|
Reference in New Issue