Skip to content

Commit

Permalink
key validation to 3 decimal values
Browse files Browse the repository at this point in the history
  • Loading branch information
JrtPec committed Jul 19, 2024
1 parent 937b0a1 commit 1207629
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openenergyid/energysharing/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class KeyInput(TimeDataFrame):
def model_post_init(self, __context: Any) -> None:
"""Post-initialization validation."""
for row in self.data:
if round(sum(row), 6) != 1:
if round(sum(row), 3) != 1.0:
raise ValueError("Each row must sum to 1.")
return super().model_post_init(__context)

Expand Down

0 comments on commit 1207629

Please sign in to comment.