Skip to content

Commit 241929d

Browse files
committed
Fixed nonetype issue in demo.py
1 parent 5eab0ba commit 241929d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3709,8 +3709,8 @@ def main():
37093709
)
37103710

37113711
if summary:
3712-
steps = summary.get("totalSteps", 0)
3713-
calories = summary.get("totalKilocalories", 0)
3712+
steps = summary.get("totalSteps") or 0
3713+
calories = summary.get("totalKilocalories") or 0
37143714

37153715
# Build stats string with hydration if available
37163716
stats_parts = [f"{steps:,} steps", f"{calories} kcal"]

0 commit comments

Comments
 (0)