aboutsummaryrefslogtreecommitdiffstats
path: root/catalog/packages/views
diff options
context:
space:
mode:
authorhongyuzhao <zhao.hongyu@zte.com.cn>2020-04-08 11:50:53 +0800
committerhongyuzhao <zhao.hongyu@zte.com.cn>2020-04-08 15:28:34 +0800
commit3fcd9e6adf5833688b0007983aab00db312e433e (patch)
tree8276ad08790b71ee3bad427713875b7cbb2bff57 /catalog/packages/views
parent613fed546242f8d7f50e9322ef58617402c075bc (diff)
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 <zhao.hongyu@zte.com.cn>
Diffstat (limited to 'catalog/packages/views')
-rw-r--r--catalog/packages/views/common.py14
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(