Skip to content

Commit

Permalink
[FIX] threshold create
Browse files Browse the repository at this point in the history
  • Loading branch information
EdgarRetes committed Nov 26, 2024
1 parent dca7136 commit e4015e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kpi/models/kpi_threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def create(self, data):
# TODO: This code can be done better
range_obj1 = self.env["kpi.threshold.range"]
range_obj2 = self.env["kpi.threshold.range"]
if data.get("range_ids"):
if data.get("range_ids") and data["range_ids"][0][2]:
for range1 in data["range_ids"][0][2]:
range_obj1 = range_obj1.browse(range1)
for range2 in data["range_ids"][0][2]:
Expand Down

0 comments on commit e4015e2

Please sign in to comment.