You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by sk...@apache.org on 2023/07/31 17:52:40 UTC
[incubator-sdap-nexus] branch SDAP-467 updated: Fix for cdmslist bug in pagination PR (#263)
This is an automated email from the ASF dual-hosted git repository.
skperez pushed a commit to branch SDAP-467
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git
The following commit(s) were added to refs/heads/SDAP-467 by this push:
new a028de7 Fix for cdmslist bug in pagination PR (#263)
a028de7 is described below
commit a028de7308949cbe9bf6c5f33a87c58bd0652dd3
Author: Riley Kuttruff <72...@users.noreply.github.com>
AuthorDate: Mon Jul 31 10:52:35 2023 -0700
Fix for cdmslist bug in pagination PR (#263)
* Fix for cdmslist bug
* Fix for custom results type for cdmslist query
---------
Co-authored-by: rileykk <ri...@jpl.nasa.gov>
---
analysis/webservice/algorithms/doms/DatasetListQuery.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/analysis/webservice/algorithms/doms/DatasetListQuery.py b/analysis/webservice/algorithms/doms/DatasetListQuery.py
index 78ba6ab..7c40d18 100644
--- a/analysis/webservice/algorithms/doms/DatasetListQuery.py
+++ b/analysis/webservice/algorithms/doms/DatasetListQuery.py
@@ -23,7 +23,7 @@ from . import config
from . import values
from webservice.algorithms.NexusCalcHandler import NexusCalcHandler as BaseHandler
from webservice.NexusHandler import nexus_handler
-from webservice.webmodel import cached
+from webservice.webmodel import cached, NexusResults
@nexus_handler
@@ -120,4 +120,14 @@ class DomsDatasetListQueryHandler(BaseDomsHandler.BaseDomsQueryCalcHandler):
"insitu": insituList
}
- return BaseDomsHandler.DomsQueryResults(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)