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

commit 27006437f0d2fb3e86f844908640eab2b029c82c
Author: lahiruj <[email protected]>
AuthorDate: Wed Jul 23 17:03:25 2025 -0400

    fixed the attribute error, to align with python 3.10
---
 airavata-django-portal/django_airavata/apps/api/views.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/airavata-django-portal/django_airavata/apps/api/views.py 
b/airavata-django-portal/django_airavata/apps/api/views.py
index b5cc24e5d..9130544c7 100644
--- a/airavata-django-portal/django_airavata/apps/api/views.py
+++ b/airavata-django-portal/django_airavata/apps/api/views.py
@@ -306,10 +306,9 @@ class ExperimentSearchViewSet(mixins.ListModelMixin, 
GenericAPIBackedViewSet):
 
         filters = {}
         for filter_item in self.request.query_params.items():
-            if filter_item[0] in ExperimentSearchFields._NAMES_TO_VALUES:
+            if filter_item[0] in ExperimentSearchFields.__members__:
                 # Lookup enum value for this ExperimentSearchFields
-                search_field = ExperimentSearchFields._NAMES_TO_VALUES[
-                    filter_item[0]]
+                search_field = ExperimentSearchFields[filter_item[0]]
                 filters[search_field] = filter_item[1]
 
         class ExperimentSearchResultIterator(APIResultIterator):

Reply via email to