Skip to content

Commit

Permalink
add client_id filter for GET /orders
Browse files Browse the repository at this point in the history
  • Loading branch information
william57m committed Nov 6, 2014
1 parent 55311c0 commit 29560c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webserver/controllers/orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 29560c2

Please sign in to comment.