Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1cd06e1

Browse files
committedOct 6, 2024·
Update relay storage considerations
1 parent 9e337e4 commit 1cd06e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎opensensor/collection_apis.py

+4
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,10 @@ def sample_and_paginate_collection(
583583
relays = []
584584
for relay in item["relays"]:
585585
try:
586+
if isinstance(relay, str):
587+
relay = json.loads(relay)
588+
if isinstance(relay, list):
589+
relay = relay[0]
586590
relays.append(RelayStatus(**relay))
587591
except Exception as e:
588592
logger.error(f"Error creating RelayStatus: {e}")

0 commit comments

Comments
 (0)
Please sign in to comment.