Skip to content

Commit

Permalink
Remove whitespace from blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
felder101 committed Jan 7, 2025
1 parent d97385a commit d5fde3f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions training/repositories/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from datetime import datetime
from collections import namedtuple


class UserRepository(BaseRepository[models.User]):

def __init__(self, session: Session):
Expand Down Expand Up @@ -73,7 +74,7 @@ def get_user_quiz_completion_report(self, filter: SmartPayTrainingReportFilter,
.join(models.Quiz)
.filter(models.QuizCompletion.passed)
)

if report_user and report_user.report_agencies:
# Dynamically add filters based on the properties of the SmartPayTrainingReportFilter
if filter.bureau_id is not None:
Expand All @@ -83,13 +84,13 @@ def get_user_quiz_completion_report(self, filter: SmartPayTrainingReportFilter,
else:
allowed_agency_ids = [obj.id for obj in report_user.report_agencies]
query = query.filter(models.User.agency_id.in_(allowed_agency_ids))

if filter.completion_date_start is not None:
query = query.filter(models.QuizCompletion.submit_ts >= filter.completion_date_start)

if filter.completion_date_end is not None:
query = query.filter(models.QuizCompletion.submit_ts <= filter.completion_date_end)

if filter.quiz_names:
query = query.filter(models.Quiz.name.in_(filter.quiz_names))

Expand All @@ -111,7 +112,7 @@ def get_user_quiz_completion_report(self, filter: SmartPayTrainingReportFilter,
)
for row in map(report_data._make, raw_results)
]

return result
else:
raise ValueError("Invalid Report User")
Expand Down

0 comments on commit d5fde3f

Please sign in to comment.