Skip to content

Commit

Permalink
MInor update to damage_model.py
Browse files Browse the repository at this point in the history
- Initialize the list in the nested dict when the scaling specs are parsed.
  • Loading branch information
zsarnoczay authored Nov 27, 2024
1 parent 4d40b4a commit c5057a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pelicun/model/damage_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,8 @@ def parse_scaling_specification(scaling_specification: dict) -> dict: # noqa: C
if fnumber is None:
msg = f'Invalid number in {css}: {number}'
raise ValueError(msg)
if limit_state_id not in parsed_scaling_specification[key]:
parsed_scaling_specification[key][limit_state_id] = []
parsed_scaling_specification[key][limit_state_id].append(
(capacity_adjustment_operation, fnumber)
)
Expand Down

0 comments on commit c5057a0

Please sign in to comment.