Skip to content

Commit

Permalink
Update xcube/webapi/statistics/controllers.py
Browse files Browse the repository at this point in the history
Co-authored-by: Norman Fomferra <norman.fomferra@brockmann-consult.de>
  • Loading branch information
b-yogesh and forman authored Sep 12, 2024
1 parent ab309b5 commit 984dddc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xcube/webapi/statistics/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ def _compute_statistics(
raise ApiError.BadRequest("Invalid query parameter 'time'") from e
else:
raise ApiError.BadRequest("Missing query parameter 'time'")
else:
if time_label is not None:
raise ApiError.BadRequest(
"Time label must be None when dataset does not contain time"
)
elif time_label is not None:
raise ApiError.BadRequest(
"Query parameter 'time' must not be given"
"since dataset does not contain a 'time' dimension"
)

if isinstance(geometry, tuple):
compact_mode = True
Expand Down

0 comments on commit 984dddc

Please sign in to comment.