diff --git a/documentation/changelog.rst b/documentation/changelog.rst index cab06c9ea..8050dfd70 100644 --- a/documentation/changelog.rst +++ b/documentation/changelog.rst @@ -10,6 +10,7 @@ Bugfixes ----------- * Relax constraint validation of `StorageScheduler` to accommodate violations caused by floating point precision [see `PR #731 `_] +* Avoid saving any :abbr:`NaN (not a number)` values to the database, when calling ``flexmeasures add report`` [see `PR #735 `_] * Fix browser console error when loading asset or sensor page with only a single data point [see `PR #732 `_] diff --git a/documentation/cli/change_log.rst b/documentation/cli/change_log.rst index c1790976e..3a8b9f2da 100644 --- a/documentation/cli/change_log.rst +++ b/documentation/cli/change_log.rst @@ -4,6 +4,11 @@ FlexMeasures CLI Changelog ********************** +since v0.14.1 | June XX, 2023 +================================= + +* Avoid saving any :abbr:`NaN (not a number)` values to the database, when calling ``flexmeasures add report``. + since v0.14.0 | June 15, 2023 ================================= diff --git a/flexmeasures/cli/data_add.py b/flexmeasures/cli/data_add.py index 847f5fc60..d51374ae7 100755 --- a/flexmeasures/cli/data_add.py +++ b/flexmeasures/cli/data_add.py @@ -1347,10 +1347,10 @@ def add_report( # noqa: C901 "Report computation done, but the report is empty.", **MsgStyle.WARN ) - # save the report it's not running in dry mode + # save the report if it's not running in dry mode if not dry_run: click.echo("Saving report to the database...") - save_to_db(result) + save_to_db(result.dropna()) db.session.commit() click.secho( "Success. The report has been saved to the database.",