modified: src/moj_licznik.py
This commit is contained in:
@@ -491,9 +491,14 @@ class MojLicznik:
|
||||
|
||||
while current_date <= date.today():
|
||||
try:
|
||||
if full_mode:
|
||||
record = ChartTable.get(id=p.id, meter_type=meter_type, year=current_date.year, month=current_date.month, day=current_date.day)
|
||||
# Jeśli rekord o określonych wartościach klucza głównego istnieje, zostanie pobrany.
|
||||
logger.debug(f"Posiadam dane historyczne dla {p.name} ({p.id}) typ: {meter_type} na dzień: {current_date}")
|
||||
else:
|
||||
self.download_chart(ChartType.DAY, current_date, p.id, meter_type)
|
||||
logger.debug(f"Aktualizuję dane dla {p.name} ({p.id}) typ: {meter_type} na dzień: {current_date}")
|
||||
|
||||
|
||||
except ChartTable.DoesNotExist:
|
||||
self.download_chart(ChartType.DAY, current_date, p.id, meter_type)
|
||||
logger.debug(f"Pobieram dane historyczne dla {p.name} ({p.id}) typ: {meter_type} na dzień: {current_date}")
|
||||
|
||||
Reference in New Issue
Block a user