Skip to content

Commit

Permalink
hotfix: disaster recovery objectives with multiple parent assets (#1182)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene authored Dec 13, 2024
1 parent 366e5e1 commit 6d2efe8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1552,8 +1552,9 @@ def get_disaster_recovery_objectives(self) -> dict[str, dict[str, dict[str, int]
if key not in disaster_recovery_objectives:
disaster_recovery_objectives[key] = content
else:
disaster_recovery_objectives[key] = min(
disaster_recovery_objectives[key], content.get("value", 0)
disaster_recovery_objectives[key]["value"] = min(
disaster_recovery_objectives[key].get("value", 0),
content.get("value", 0),
)

return {"objectives": disaster_recovery_objectives}
Expand Down

0 comments on commit 6d2efe8

Please sign in to comment.