Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/matt/dim-selectors' into matt/di…
Browse files Browse the repository at this point in the history
…m-selectors
  • Loading branch information
mpiannucci committed Oct 17, 2024
2 parents 6879450 + 081d674 commit 496622d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xpublish_wms/wms/get_capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def get_capabilities(ds: xr.Dataset, request: Request, query_params: dict) -> Re
attrs.get("standard_name", attrs.get("name", var)),
)
long_name = attrs.get("long_name", None)
if long_name is not None or type(long_name) is not str:
if long_name is not None or type(long_name) is not str:
long_name = attrs.get("name", var)

create_text_element(
Expand All @@ -206,7 +206,7 @@ def get_capabilities(ds: xr.Dataset, request: Request, query_params: dict) -> Re

ET.SubElement(layer, "BoundingBox", attrib=bounds)

if "time" in da.cf.coords and 'time' in da.cf.indexes:
if "time" in da.cf.coords and "time" in da.cf.indexes:
times = format_timestamp(da.cf["time"])
default_time = format_timestamp(
da.cf["time"].cf.sel(time=current_date, method="nearest"),
Expand Down

0 comments on commit 496622d

Please sign in to comment.