diff options
Diffstat (limited to 'catalog/packages/views/common.py')
-rw-r--r-- | catalog/packages/views/common.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/catalog/packages/views/common.py b/catalog/packages/views/common.py index 12840a5..e25deea 100644 --- a/catalog/packages/views/common.py +++ b/catalog/packages/views/common.py @@ -68,16 +68,14 @@ def view_safe_call_with_log(logger): return func(*args, **kwargs) except NsdmDuplicateSubscriptionException as e: logger.error(e.args[0]) - return make_error_resp( - detail=e.args[0], - status=status.HTTP_303_SEE_OTHER - ) + resp = Response(status=status.HTTP_303_SEE_OTHER, headers={'Location': e.args[0]}) + # resp["Location"] = e.args[0] + return resp except VnfPkgDuplicateSubscriptionException as e: logger.error(e.args[0]) - return make_error_resp( - detail=e.args[0], - status=status.HTTP_303_SEE_OTHER - ) + resp = Response(status=status.HTTP_303_SEE_OTHER, headers={'Location': e.args[0]}) + # resp["Location"] = e.args[0] + return resp except PackageNotFoundException as e: logger.error(e.args[0]) return make_error_resp( |