Skip to content

Commit

Permalink
Fix linting and add test data
Browse files Browse the repository at this point in the history
  • Loading branch information
nikki-t committed May 8, 2024
1 parent 6f82215 commit b67f257
Show file tree
Hide file tree
Showing 2 changed files with 1,163 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hydrocron/api/controllers/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def get_response(results, hits, elapsed, return_type, output, compact):


def compact_results(results):
"""Compact GeoJSON results to return a properties object with aggregated
"""Compact GeoJSON results to return a properties object with aggregated
time series data.
:param results: Dictionary of SWOT timeseries results
Expand All @@ -412,7 +412,7 @@ def compact_results(results):

fields = list(results['features'][0]['properties'].keys())
for field in fields:
response['features'][0]['properties'][field] = [ feature['properties'][field] for feature in results['features'] ]
response['features'][0]['properties'][field] = [feature['properties'][field] for feature in results['features']]

return response

Expand Down

0 comments on commit b67f257

Please sign in to comment.