File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1112,6 +1112,7 @@ def acteur_actions(
1112
1112
)
1113
1113
1114
1114
if sous_categorie_ids :
1115
+ print (f"{ sous_categorie_ids = } " )
1115
1116
pss = pss .filter (sous_categories__id__in = sous_categorie_ids )
1116
1117
if direction :
1117
1118
pss = pss .filter (action__directions__code__in = [direction ])
@@ -1171,10 +1172,15 @@ def json_acteur_for_display(
1171
1172
# TODO: refacto jinja: once the shared/results.html template
1172
1173
# will be migrated to django template, this method should
1173
1174
# live in a template_tags instead.
1174
- sous_categorie_ids = [sous_categorie_id ]
1175
+ sous_categorie_ids = []
1175
1176
1176
- if sous_categories := displayed_acteur_form .cleaned_data .get ("sous_categories" ):
1177
+ if (
1178
+ sous_categories := displayed_acteur_form
1179
+ and displayed_acteur_form .cleaned_data .get ("sous_categories" )
1180
+ ):
1177
1181
sous_categorie_ids = sous_categories .values_list ("id" , flat = True )
1182
+ elif sous_categorie_id :
1183
+ sous_categorie_ids .append (sous_categorie_id )
1178
1184
1179
1185
actions = self .acteur_actions (
1180
1186
direction = direction ,
You can’t perform that action at this time.
0 commit comments