Fix handling of null values in responses

This commit is contained in:
Michał Leśniewski
2023-04-07 21:07:54 +02:00
parent 53b5b63df2
commit 382ef0ed6a
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ long_description = (here / 'README.md').read_text(encoding='utf-8')
setup(
name='elicznik',
version='1.4.0',
version='1.4.1',
description='Tauron eLicznik scrapper',
long_description=long_description,
long_description_content_type='text/markdown',

View File

@@ -61,6 +61,6 @@ class ELicznik:
consumed = self.get_readings_consumption(start_date, end_date)
produced = self.get_readings_production(start_date, end_date)
return sorted(
(timestamp, float(consumed.get(timestamp)), float(produced.get(timestamp)))
(timestamp, consumed.get(timestamp), produced.get(timestamp))
for timestamp in set(consumed) | set(produced)
)