You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2025/07/30 19:43:49 UTC
(airavata-portals) branch main updated: bug fix - adding a new deployment for an application
This is an automated email from the ASF dual-hosted git repository.
lahirujayathilake pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airavata-portals.git
The following commit(s) were added to refs/heads/main by this push:
new de83419b9 bug fix - adding a new deployment for an application
de83419b9 is described below
commit de83419b9de4dc5b98dd1a40667430bcb92b19bc
Author: lahiruj <la...@gmail.com>
AuthorDate: Wed Jul 30 15:43:43 2025 -0400
bug fix - adding a new deployment for an application
---
.../django_airavata/apps/api/thrift_utils.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/airavata-django-portal/django_airavata/apps/api/thrift_utils.py b/airavata-django-portal/django_airavata/apps/api/thrift_utils.py
index 4a30a1f70..0ca3d5bc8 100644
--- a/airavata-django-portal/django_airavata/apps/api/thrift_utils.py
+++ b/airavata-django-portal/django_airavata/apps/api/thrift_utils.py
@@ -24,6 +24,7 @@ from thrift.Thrift import TType
from airavata.model.experiment.ttypes import ExperimentType
from airavata.model.status.ttypes import ExperimentState
from airavata.model.application.io.ttypes import DataType
+from airavata.model.appcatalog.parallelism.ttypes import ApplicationParallelismType
logger = logging.getLogger(__name__)
@@ -161,12 +162,20 @@ def create_serializer_class(thrift_data_type, enable_date_time_conversion=False)
def create(self, validated_data):
params = self.process_nested_fields(validated_data)
- if thrift_data_type.__name__ == 'ExperimentModel' and 'experimentId' in params and params['experimentId'] is None:
+ if (thrift_data_type.__name__ == 'ExperimentModel' and
+ 'experimentId' in params and params['experimentId'] is None):
del params['experimentId']
- if thrift_data_type.__name__ == 'ExperimentModel' and 'experimentType' in params and isinstance(params['experimentType'], int):
+ if (thrift_data_type.__name__ == 'ExperimentModel' and
+ 'experimentType' in params and isinstance(params['experimentType'], int)):
params['experimentType'] = ExperimentType(params['experimentType'])
+ if thrift_data_type.__name__ == 'ApplicationDeploymentDescription':
+ if 'appDeploymentId' in params and params['appDeploymentId'] is None:
+ del params['appDeploymentId']
+ if 'parallelism' in params and isinstance(params['parallelism'], int):
+ params['parallelism'] = ApplicationParallelismType(params['parallelism'])
+
return thrift_data_type(**params)
def update(self, instance, validated_data):