Skip to content

Commit 95e2885

Browse files
committed
Bugfix for stage error.
1 parent 8bd705b commit 95e2885

File tree

1 file changed

+8
-3
lines changed
  • application/blueprints/planning_consideration

1 file changed

+8
-3
lines changed

application/blueprints/planning_consideration/views.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,14 @@ def considerations():
206206

207207
stage_param = []
208208
if "stage" in request.args:
209-
stage_selections = [
210-
Stage(selection) for selection in request.args.getlist("stage")
211-
]
209+
stage_selections = []
210+
for selection in request.args.getlist("stage"):
211+
try:
212+
stage = Stage(selection)
213+
stage_selections.append(stage)
214+
except ValueError:
215+
continue
216+
stage_selections.append(stage)
212217
stage_param = stage_selections
213218
filter_condition = Consideration.stage.in_(stage_selections)
214219
query = query.filter(filter_condition)

0 commit comments

Comments
 (0)