From 29560c2607aef088e2bcccd620a3807ec02eec1a Mon Sep 17 00:00:00 2001 From: william57m Date: Thu, 6 Nov 2014 09:31:35 -0500 Subject: [PATCH] add client_id filter for GET /orders --- webserver/controllers/orders.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webserver/controllers/orders.py b/webserver/controllers/orders.py index 3fb0b8d..ddca8e8 100644 --- a/webserver/controllers/orders.py +++ b/webserver/controllers/orders.py @@ -50,6 +50,9 @@ def list(): query = query.join(StateOrder).filter(StateOrder.name == state) + if 'client_id' in request.values: + query = query.filter(Order.client_id == request.values['client_id']) + orders = query.all() # Build the response