Commit 0427c26 1 parent 58449cb commit 0427c26 Copy full SHA for 0427c26
File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -210,17 +210,19 @@ def get_areas():
210
210
query = query .where (LAreas .enable == True )
211
211
212
212
if "id_type" in params :
213
- query = query .where (LAreas .id_type .in_ (params .getlist ("id_type" )))
213
+ # getlist() of request.args does not use the syntax url?param=val1,val2
214
+ id_type = params .get ("id_type" ).split ("," )
215
+ query = query .where (LAreas .id_type .in_ (id_type ))
214
216
215
217
if "type_code" in params :
216
- query = query . where (
217
- LAreas . area_type . has ( BibAreasTypes . type_code . in_ ( params .getlist ("type_code" )) )
218
- )
218
+ # getlist() of request.args does not use the syntax url?param=val1,val2
219
+ type_code = params .get ("type_code" ). split ( "," )
220
+ query = query . where ( LAreas . area_type . has ( BibAreasTypes . type_code . in_ ( type_code )) )
219
221
220
222
if "area_name" in params :
221
223
query = query .where (LAreas .area_name .ilike ("%{}%" .format (params .get ("area_name" ))))
222
224
223
- without_geom = params .get ("without_geom" , False , lambda x : x == "true" )
225
+ without_geom = request . args .get ("without_geom" , False , lambda x : x == "true" )
224
226
if without_geom :
225
227
query = query .options (defer ("geom" ))
226
228
marsh_params ["exclude" ] = ["geom" ]
You can’t perform that action at this time.
0 commit comments