Skip to content

Commit ee0c248

Browse files
committed
Fix for #1901, Thanks @pro100805
1 parent d5d9450 commit ee0c248

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

thingsboard_gateway/gateway/tb_gateway_service.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,9 +1397,12 @@ def __send_data_pack_to_storage(self, data, connector_name, connector_id=None):
13971397
if isinstance(data, ConvertedData):
13981398
if self.__latency_debug_mode:
13991399
data.add_to_metadata({"putToStorageTs": int(time() * 1000)})
1400-
json_data = dumps(data.to_dict(self.__latency_debug_mode), separators=(',', ':'), skipkeys=True)
1400+
json_data = dumps(data.to_dict(self.__latency_debug_mode),
1401+
separators=(',', ':'),
1402+
skipkeys=True,
1403+
ignore_nan=True)
14011404
else:
1402-
json_data = dumps(data, separators=(',', ':'), skipkeys=True)
1405+
json_data = dumps(data, separators=(',', ':'), skipkeys=True, ignore_nan=True)
14031406
save_result = self._event_storage.put(json_data)
14041407
tries = 4
14051408
current_try = 0

0 commit comments

Comments
 (0)