Skip to content

Commit

Permalink
Update relay storage considerations
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius committed Oct 6, 2024
1 parent 466afba commit 66ef15c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions opensensor/collection_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,9 @@ def sample_and_paginate_collection(
try:
if isinstance(relay, str):
relay = json.loads(relay)
if isinstance(relay, list):
relay = relay[0]
relays.append(RelayStatus(**relay))
except Exception:
except Exception as e:
logger.error(f"Error creating RelayStatus: {e}")
pass # Ignore invalid relay data
relay_board = RelayBoard(relays=relays)
data.append(relay_board)
Expand Down

0 comments on commit 66ef15c

Please sign in to comment.