Skip to content

Commit

Permalink
Show message if process or artifact data is empty instead of empty da…
Browse files Browse the repository at this point in the history
…taframe
  • Loading branch information
henhuy committed Mar 6, 2024
1 parent d2bdeb6 commit d2ee2ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project tries to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- show message if process or artifact data is empty instead of empty dataframe

## [0.4.1] - 2024-03-06
### Changed
- update data_adapter to v0.20.2
Expand Down
6 changes: 3 additions & 3 deletions django_energysystem_viewer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ def get_context_data(self, **kwargs):
return {
"collection_name": collection_name,
"artifacts": artifacts,
"scalars": process.scalars.to_html(),
"timeseries": process.timeseries.to_html(),
"scalars": process.scalars.to_html() if not process.scalars.empty else "No data available",
"timeseries": process.timeseries.to_html() if not process.timeseries.empty else "No data available",
}


Expand Down Expand Up @@ -170,7 +170,7 @@ def get_context_data(self, **kwargs):
"processes": collection.get_collection_meta(collection_name)["artifacts"][group_name][artifact_name][
"names"
],
"data": artifact.data.to_html(),
"data": artifact.data.to_html() if not artifact.data.empty else "No data available",
"metadata": metadataWidget.render(),
}

Expand Down

0 comments on commit d2ee2ec

Please sign in to comment.