diff --git a/.vscode/launch.json b/.vscode/launch.json index eb2d0bb..d7d90ae 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "version": "0.2.0", "configurations": [ { - "name": "Python Debugger", + "name": "Debug: Development Mode", "type": "debugpy", "request": "launch", "program": "main.py", @@ -14,6 +14,14 @@ "env": { "PRIVATECOFFEE_DEV": "1" } + }, + { + "name": "Debug: Production Mode", + "type": "debugpy", + "request": "launch", + "program": "main.py", + "console": "integratedTerminal", + "cwd": "${workspaceFolder}" } ] } \ No newline at end of file diff --git a/helpers/finances.py b/helpers/finances.py index 1d00d60..325acfb 100644 --- a/helpers/finances.py +++ b/helpers/finances.py @@ -29,6 +29,9 @@ def get_transparency_data(data, year=None, month=None, allow_current=False): if month is None: month = max(data[year].keys()) + year = str(year) + month = str(month) + if ( not allow_current and year == str(datetime.now().year) diff --git a/main.py b/main.py index f7cd9bd..41b1c40 100644 --- a/main.py +++ b/main.py @@ -62,7 +62,7 @@ def catch_all(path): finances_table = generate_transparency_table( get_transparency_data( - finances, finances_year, finances_month + finances, finances_year, finances_month, allow_current ) )