Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(thermal): change validation on empty matrices
Browse files Browse the repository at this point in the history
MartinBelthle committed Apr 5, 2024
1 parent b9d71e0 commit a7026b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion antarest/study/business/areas/thermal_management.py
Original file line number Diff line number Diff line change
@@ -375,7 +375,7 @@ def validate_series(self, study: Study, area_id: str, cluster_id: str) -> bool:
matrix = self.storage_service.get_storage(study).get(study, matrix_path)
matrix_data = matrix["data"]
matrix_length = len(matrix_data)
if matrix_length > 0 and matrix_length != 8760:
if matrix_data != [[]] and matrix_length != 8760:
raise IncoherenceBetweenMatricesLength(
f"The matrix {Path(matrix_path).name} should have 8760 rows, currently: {matrix_length}"
)

0 comments on commit a7026b6

Please sign in to comment.