Skip to content

Commit

Permalink
Instead of getting blackened, this is flakey
Browse files Browse the repository at this point in the history
  • Loading branch information
dbutenhof committed Mar 16, 2023
1 parent 3ead23a commit 0c135d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/pbench/server/api/resources/datasets_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ def datasets(self, request: Request, json: JSONOBJECT, query: Query) -> JSONOBJE
keys = json.get("metadata")

response = []
errors = []
for dataset in datasets:
d = {
"name": dataset.name,
Expand All @@ -390,10 +391,13 @@ def datasets(self, request: Request, json: JSONOBJECT, query: Query) -> JSONOBJE
try:
d["metadata"] = self._get_dataset_metadata(dataset, keys)
except MetadataError as e:
errors.append(str(e))
d["metadata"] = None
response.append(d)

paginated_result["results"] = response
if errors:
paginated_result["errors"] = errors
return paginated_result

def _get(
Expand Down

0 comments on commit 0c135d6

Please sign in to comment.