Skip to content

Commit

Permalink
fix(study): correct access to study additional_data (#1949)
Browse files Browse the repository at this point in the history
Avoid `Attribut Error` when a study has no `additional_data`.
  • Loading branch information
laurent-laporte-pro authored and skamril committed Feb 27, 2024
1 parent 2e79399 commit 0bb68bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion antarest/study/storage/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def update_antares_info(metadata: Study, study_tree: FileStudyTree, *, update_au
study_data_info["antares"]["created"] = metadata.created_at.timestamp()
study_data_info["antares"]["lastsave"] = metadata.updated_at.timestamp()
study_data_info["antares"]["version"] = metadata.version
if update_author:
if update_author and metadata.additional_data:
study_data_info["antares"]["author"] = metadata.additional_data.author
study_tree.save(study_data_info, ["study"])

Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ v2.16.5 (2024-02-29)
* **ui-results:** prevent duplicate updates on same toggle button click [`#1945`](https://github.com/AntaresSimulatorTeam/AntaREST/pull/1945)
* **ui-thermal:** update cluster group options to handle `Other 1` [`#1945`](https://github.com/AntaresSimulatorTeam/AntaREST/pull/1945)
* **variants:** correct the generation of variant when a snapshot is removed [`#1947`](https://github.com/AntaresSimulatorTeam/AntaREST/pull/1947)
* **study:** correct access to study `additional_data` [`#1949`](https://github.com/AntaresSimulatorTeam/AntaREST/pull/1949)


v2.16.4 (2024-02-14)
Expand Down

0 comments on commit 0bb68bd

Please sign in to comment.