Skip to content

Commit

Permalink
[fix] Both 'rx_bytes' and 'tx_bytes' are present #595
Browse files Browse the repository at this point in the history
Fixes #595
  • Loading branch information
praptisharma28 committed Sep 10, 2024
1 parent 669ee3d commit cbf7e7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openwisp_monitoring/device/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def write(self, data, time=None, current=False):
# Explicitly stated None to avoid skipping in case the stats are zero
if (
ifstats.get('rx_bytes') is not None
and ifstats.get('rx_bytes') is not None
and ifstats.get('tx_bytes') is not None
):
field_value = self._calculate_increment(
ifname, 'rx_bytes', ifstats['rx_bytes']
Expand Down

0 comments on commit cbf7e7a

Please sign in to comment.