Skip to content

Commit f8af15a

Browse files
committed
Cleanup
1 parent f9a6dc2 commit f8af15a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/ess/livedata/dashboard/extractors.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,7 @@ def get_required_timespan(self) -> float:
6363

6464
def extract(self, data: sc.DataArray) -> Any:
6565
"""Extract the latest value from the data, unwrapped."""
66-
# Check if data has the concat dimension
67-
if not hasattr(data, 'dims') or self._concat_dim not in data.dims:
68-
# Data doesn't have concat dim - already a single frame
69-
return data
70-
71-
# Extract last frame along concat dimension
72-
return data[self._concat_dim, -1]
66+
return data[self._concat_dim, -1] if self._concat_dim in data.dims else data
7367

7468

7569
class FullHistoryExtractor(UpdateExtractor):

0 commit comments

Comments
 (0)