diff --git a/source/app/blueprints/manage/manage_cases_routes.py b/source/app/blueprints/manage/manage_cases_routes.py index 374aaa032..53944ab43 100644 --- a/source/app/blueprints/manage/manage_cases_routes.py +++ b/source/app/blueprints/manage/manage_cases_routes.py @@ -75,7 +75,7 @@ from app.util import response_success from app.business.cases import delete from app.business.errors import BusinessProcessingError -from app.business.errors import PermissionDenied +from app.business.errors import PermissionDeniedError manage_cases_blueprint = Blueprint('manage_case', __name__, @@ -240,7 +240,7 @@ def api_delete_case(cur_id, caseid): return response_success('Case successfully deleted') except BusinessProcessingError as e: return response_error(str(e)) - except PermissionDenied: + except PermissionDeniedError: return ac_api_return_access_denied(caseid=cur_id) diff --git a/source/app/business/cases.py b/source/app/business/cases.py index 7f203bf4e..1d8383253 100644 --- a/source/app/business/cases.py +++ b/source/app/business/cases.py @@ -23,12 +23,12 @@ from app.iris_engine.utils.tracker import track_activity from app.datamgmt.manage.manage_cases_db import delete_case from app.business.errors import BusinessProcessingError -from app.business.errors import PermissionDenied +from app.business.errors import PermissionDeniedError def delete(identifier, context_case_identifier): if not ac_fast_check_current_user_has_case_access(identifier, [CaseAccessLevel.full_access]): - raise PermissionDenied() + raise PermissionDeniedError() if identifier == 1: track_activity(f'tried to delete case {identifier}, but case is the primary case', diff --git a/source/app/business/errors.py b/source/app/business/errors.py index f1c03576c..711d63f0c 100644 --- a/source/app/business/errors.py +++ b/source/app/business/errors.py @@ -21,5 +21,5 @@ class BusinessProcessingError(Exception): pass -class PermissionDenied(Exception): +class PermissionDeniedError(Exception): pass