Skip to content

Commit 66ef15c

Browse files
committed
Update relay storage considerations
1 parent 466afba commit 66ef15c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

opensensor/collection_apis.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,9 @@ def sample_and_paginate_collection(
585585
try:
586586
if isinstance(relay, str):
587587
relay = json.loads(relay)
588-
if isinstance(relay, list):
589-
relay = relay[0]
590588
relays.append(RelayStatus(**relay))
591-
except Exception:
589+
except Exception as e:
590+
logger.error(f"Error creating RelayStatus: {e}")
592591
pass # Ignore invalid relay data
593592
relay_board = RelayBoard(relays=relays)
594593
data.append(relay_board)

0 commit comments

Comments
 (0)