Skip to content

Commit

Permalink
core/api: Fix ports history bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrisan committed Nov 18, 2023
1 parent 6448b80 commit 365f33f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions qtoggleserver/core/api/funcs/ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ async def get_port_history(request: core_api.APIRequest, port_id: str) -> Generi

if timestamps is not None:
samples = await core_history.get_samples_by_timestamp(port, timestamps)
samples = list(samples)
else:
samples = await core_history.get_samples_slice(port, from_timestamp, to_timestamp, limit)
samples = [{'timestamp': s[0], 'value': s[1]} for s in samples]
Expand Down

0 comments on commit 365f33f

Please sign in to comment.