You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by rk...@apache.org on 2023/07/05 20:42:01 UTC

[incubator-sdap-nexus] 02/02: Fix for custom results type for cdmslist query

This is an automated email from the ASF dual-hosted git repository.

rkk pushed a commit to branch SDAP-467-b
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git

commit 00a1dbac5c45618fa9f2b675c42fc45b1d83340a
Author: rileykk <ri...@jpl.nasa.gov>
AuthorDate: Wed Jul 5 13:34:54 2023 -0700

    Fix for custom results type for cdmslist query
---
 analysis/webservice/algorithms/doms/DatasetListQuery.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/analysis/webservice/algorithms/doms/DatasetListQuery.py b/analysis/webservice/algorithms/doms/DatasetListQuery.py
index bf3c07f..7c40d18 100644
--- a/analysis/webservice/algorithms/doms/DatasetListQuery.py
+++ b/analysis/webservice/algorithms/doms/DatasetListQuery.py
@@ -120,4 +120,14 @@ class DomsDatasetListQueryHandler(BaseDomsHandler.BaseDomsQueryCalcHandler):
             "insitu": insituList
         }
 
-        return NexusResults(results=values)
+        return DatasetListResults(results=values)
+
+
+class DatasetListResults(NexusResults):
+    def __init__(self, results=None):
+        NexusResults.__init__(self, results=results)
+
+        self.__results = results
+
+    def toJson(self):
+        return json.dumps({'data': self.__results}, indent=4)