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 8a3822272 bug fix - extract the right enum of experimentStatus#state 
when clone-run an experiment
8a3822272 is described below

commit 8a3822272cf5f8679fc8c1a60f175eaecc0e1018
Author: lahiruj <[email protected]>
AuthorDate: Wed Jul 30 11:28:37 2025 -0400

    bug fix - extract the right enum of experimentStatus#state when clone-run 
an experiment
---
 airavata-django-portal/django_airavata/apps/api/thrift_utils.py | 5 +++++
 1 file changed, 5 insertions(+)

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 802ddd7d9..4a30a1f70 100644
--- a/airavata-django-portal/django_airavata/apps/api/thrift_utils.py
+++ b/airavata-django-portal/django_airavata/apps/api/thrift_utils.py
@@ -22,6 +22,7 @@ from rest_framework.serializers import (
 )
 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
 
 logger = logging.getLogger(__name__)
@@ -143,6 +144,10 @@ def create_serializer_class(thrift_data_type, 
enable_date_time_conversion=False)
                                 for item in params[field_name]:
                                     if 'type' in item and 
isinstance(item['type'], int):
                                         item['type'] = DataType(item['type'])
+                            elif field_name == 'experimentStatus' and 'state' 
in serializer.child.fields:
+                                for item in params[field_name]:
+                                    if 'state' in item and 
isinstance(item['state'], int):
+                                        item['state'] = 
ExperimentState(item['state'])
                             params[field_name] = [serializer.child.create(
                                 item) for item in params[field_name]]
                         else:

Reply via email to