You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/07/06 14:56:07 UTC
[airavata-django-portal] branch develop updated: AIRAVATA-3420 Fix
backwards compatible use of GATEWAY_DATA_STORE_REMOTE_API in /launch/ api
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/develop by this push:
new ecbf68c AIRAVATA-3420 Fix backwards compatible use of GATEWAY_DATA_STORE_REMOTE_API in /launch/ api
ecbf68c is described below
commit ecbf68c7d5ffb11ea3648dbe24d83be0a3900f3e
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jul 6 10:55:52 2021 -0400
AIRAVATA-3420 Fix backwards compatible use of GATEWAY_DATA_STORE_REMOTE_API in /launch/ api
---
django_airavata/apps/api/views.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/django_airavata/apps/api/views.py b/django_airavata/apps/api/views.py
index ff7d512..05fdbe1 100644
--- a/django_airavata/apps/api/views.py
+++ b/django_airavata/apps/api/views.py
@@ -300,7 +300,7 @@ class ExperimentViewSet(mixins.CreateModelMixin,
headers = {
'Authorization': f'Bearer {request.authz_token.accessToken}'}
r = requests.post(
- f'{settings.GATEWAY_DATA_STORE_REMOTE_API}/api/experiments/{quote(experiment_id)}/launch/',
+ f'{remote_api_url}/api/experiments/{quote(experiment_id)}/launch/',
headers=headers,
)
r.raise_for_status()
@@ -314,7 +314,7 @@ class ExperimentViewSet(mixins.CreateModelMixin,
request.authz_token, experiment_id, self.gateway_id)
return Response({'success': True})
except Exception as e:
- return Response({'success': False, 'errorMessage': e.message})
+ return Response({'success': False, 'errorMessage': str(e)})
@action(methods=['get'], detail=True)
def jobs(self, request, experiment_id=None):