From 3fcd9e6adf5833688b0007983aab00db312e433e Mon Sep 17 00:00:00 2001 From: hongyuzhao Date: Wed, 8 Apr 2020 11:50:53 +0800 Subject: fix bug for ETSI Catalog Manager needs to raise 303 exception for the same callback_uri and the same filter Change-Id: Ie577540d2c4bb25299059869ce967422610f5785 Issue-ID: MODELING-353 Signed-off-by: hongyu zhao --- catalog/packages/views/common.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'catalog/packages/views') 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( -- cgit 1.2.3-korg