Skip to content

Commit 6b10fcb

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 69d5a70 commit 6b10fcb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎apps/predbat/inverter.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3406,6 +3406,8 @@ def rest_readDischargeTarget(self):
34063406
write is even needed can end up re-writing every cycle on hardware where that field never
34073407
catches up (#4421, #4517).
34083408
"""
3409+
if not isinstance(self.rest_data, dict):
3410+
return None
34093411
try:
34103412
result = int(float(self.rest_data.get("Control", {}).get("Discharge_Target_SOC_1", None)))
34113413
except (ValueError, TypeError):

0 commit comments

Comments
 (0)