Skip to content

Commit

Permalink
Fix for types
Browse files Browse the repository at this point in the history
  • Loading branch information
hemna committed Nov 17, 2023
1 parent b0bfdaa commit 809a41f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions aprsd/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,14 @@ def _stats():
stats_dict["aprsd"]["watch_list"] = new_list
packet_list = aprsd_rpc_client.RPCClient().get_packet_list()
rx = tx = 0
types = {}
if packet_list:
rx = packet_list.total_rx()
tx = packet_list.total_tx()
types = {}

types_copy = packet_list.types.copy()
types_copy = packet_list.types.copy()

for key in types_copy:
types[str(key)] = dict(types_copy[key])
for key in types_copy:
types[str(key)] = dict(types_copy[key])

stats_dict["packets"] = {
"sent": tx,
Expand Down

0 comments on commit 809a41f

Please sign in to comment.