|
|
|
@ -125,14 +125,14 @@ def address_search(): |
|
|
|
|
|
|
|
@main.route('/plan_search') |
|
|
|
def plan_search(): |
|
|
|
plan_req: List[str] = request.args.get('plans', '').split(',') |
|
|
|
if not plan_req or plan_req == ['']: |
|
|
|
plan_req: Dict[str] = request.args.to_dict(flat=False) |
|
|
|
if not plan_req or "plans" not in plan_req: |
|
|
|
return jsonify({"plans": []}), HTTPStatus.OK |
|
|
|
|
|
|
|
else: |
|
|
|
try: |
|
|
|
plans = ( |
|
|
|
db.session.query(Plans) |
|
|
|
.filter(Plans.PlanIdentifier.in_(plan_req)) |
|
|
|
.filter(Plans.PlanIdentifier.in_(plan_req['plans'])) |
|
|
|
.all() |
|
|
|
) |
|
|
|
|
|
|
|
|