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 Jul 26, 2024
1 parent 34d0e8e commit 64f6514
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 @@ -82,7 +82,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 64f6514

Please sign in to comment.