From 21af2b8ce97d2ff49e9edb2414b852af2b087749 Mon Sep 17 00:00:00 2001 From: dandds Date: Fri, 22 Mar 2019 14:47:42 -0400 Subject: [PATCH] separate control structures for task_order_id and portfolio_id in decorator --- atst/domain/authz/decorator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atst/domain/authz/decorator.py b/atst/domain/authz/decorator.py index 4c240ac3..17755749 100644 --- a/atst/domain/authz/decorator.py +++ b/atst/domain/authz/decorator.py @@ -15,7 +15,8 @@ def check_access(permission, message, exception, *args, **kwargs): access_args["portfolio"] = Portfolios.get( g.current_user, kwargs["portfolio_id"] ) - elif "task_order_id" in kwargs: + + if "task_order_id" in kwargs: task_order = TaskOrders.get(kwargs["task_order_id"]) access_args["portfolio"] = task_order.portfolio