pre-commit fixes

This commit is contained in:
Joel Falknau
2024-12-04 22:08:47 +10:00
parent dc0c1a2818
commit 5e836c4285
23 changed files with 97 additions and 91 deletions

View File

@@ -143,7 +143,12 @@ def fatlink_statistics_corp_view(request, corpid, year=None, month=None):
@login_required
@permission_required('auth.fleetactivitytracking_statistics')
def fatlink_statistics_view(request, year=datetime.date.today().year, month=datetime.date.today().month):
def fatlink_statistics_view(request, year=None, month=None):
if year is None:
year = datetime.date.today().year
if month is None:
month = datetime.date.today().month
year = int(year)
month = int(month)
start_of_month = datetime.datetime(year, month, 1)
@@ -176,9 +181,12 @@ def fatlink_statistics_view(request, year=datetime.date.today().year, month=date
@login_required
def fatlink_personal_statistics_view(request, year=datetime.date.today().year):
def fatlink_personal_statistics_view(request, year=None):
if year is None:
year = datetime.date.today().year
year = int(year)
logger.debug("Personal statistics view for year %i called by %s" % (year, request.user))
logger.debug(f"Personal statistics view for year {year} called by {request.user}")
user = request.user
logger.debug(f"fatlink_personal_statistics_view called by user {request.user}")