Add tests and fix issues

This commit is contained in:
2026-04-25 10:38:21 +02:00
parent a0bdf9e37e
commit d84a0eed3f
18 changed files with 911 additions and 567 deletions

View File

@@ -5,7 +5,7 @@ logger = logging.getLogger(__name__)
def get_all_monthly_analytics(end_date:str = 'now'):
try:
return connection.query('''
return connection().query('''
WITH RECURSIVE timeseries(d) AS (
VALUES(date(:end_date,'start of year'))
UNION ALL
@@ -45,7 +45,7 @@ def get_all_monthly_analytics(end_date:str = 'now'):
def get_monthly_analytics(counter_id:int, end_date:str = 'now'):
try:
return connection.query('''
return connection().query('''
WITH RECURSIVE timeseries(d) AS (
VALUES( date(:end_date, 'start of year'))
UNION ALL