Add tests and fix issues
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user