Fixed bug
All checks were successful
Build Docker Image / build (push) Successful in 37s

This commit is contained in:
Tudor Sitaru
2026-01-05 13:47:30 +00:00
parent 8e93e3d071
commit 9bfad50e71

View File

@@ -291,16 +291,18 @@ class SnapshotDownloader:
if snapshots:
first = snapshots[0]
child_name = first.get("child", {}).get("forename", "Unknown") if first.get("child") else "Unknown"
start_time = first.get("startTime", "Unknown")[:10] if first.get("startTime") else "Unknown"
start_time = str(first.get("startTime", "Unknown"))[:10] if first.get("startTime") else "Unknown"
snapshot_id = str(first.get("id", "N/A"))[:8]
self.logger.info(
f" → First snapshot: child={child_name}, date={start_time}, id={first.get('id', 'N/A')[:8]}..."
f" → First snapshot: child={child_name}, date={start_time}, id={snapshot_id}..."
)
if len(snapshots) > 1:
last = snapshots[-1]
child_name = last.get("child", {}).get("forename", "Unknown") if last.get("child") else "Unknown"
start_time = last.get("startTime", "Unknown")[:10] if last.get("startTime") else "Unknown"
start_time = str(last.get("startTime", "Unknown"))[:10] if last.get("startTime") else "Unknown"
snapshot_id = str(last.get("id", "N/A"))[:8]
self.logger.info(
f" → Last snapshot: child={child_name}, date={start_time}, id={last.get('id', 'N/A')[:8]}..."
f" → Last snapshot: child={child_name}, date={start_time}, id={snapshot_id}..."
)
# If no cursor returned, we've reached the end