only pass one func to exception kwarg in access decorator

This commit is contained in:
dandds
2019-03-22 06:05:59 -04:00
parent 905f03342d
commit 746a5834c1
7 changed files with 18 additions and 33 deletions

View File

@@ -265,7 +265,7 @@ def is_new_task_order(*_args, **kwargs):
@task_orders_bp.route("/portfolios/<portfolio_id>/task_orders/new/<int:screen>")
@user_can(
Permissions.CREATE_TASK_ORDER,
exceptions=[is_new_task_order],
exception=is_new_task_order,
message="view new task order form",
)
def new(screen, task_order_id=None, portfolio_id=None):
@@ -316,7 +316,7 @@ def new(screen, task_order_id=None, portfolio_id=None):
)
@user_can(
Permissions.CREATE_TASK_ORDER,
exceptions=[is_new_task_order],
exception=is_new_task_order,
message="update task order",
)
def update(screen, task_order_id=None, portfolio_id=None):

View File

@@ -29,9 +29,7 @@ def wrap_check_is_ko(user, task_order_id=None, **_kwargs):
@task_orders_bp.route("/task_orders/<task_order_id>/digital_signature", methods=["GET"])
@user_can(
None,
exceptions=[wrap_check_is_ko],
message="view contracting officer signature page",
None, exception=wrap_check_is_ko, message="view contracting officer signature page"
)
def signature_requested(task_order_id):
task_order = find_unsigned_ko_to(task_order_id)
@@ -48,7 +46,7 @@ def signature_requested(task_order_id):
"/task_orders/<task_order_id>/digital_signature", methods=["POST"]
)
@user_can(
None, exceptions=[wrap_check_is_ko], message="submit contracting officer signature"
None, exception=wrap_check_is_ko, message="submit contracting officer signature"
)
def record_signature(task_order_id):
task_order = find_unsigned_ko_to(task_order_id)