diff --git a/app/logic/participants.py b/app/logic/participants.py index c451cdab3..cfa28cc88 100644 --- a/app/logic/participants.py +++ b/app/logic/participants.py @@ -297,10 +297,8 @@ def hasGoneToTraining(participant, term): Event.isAllVolunteerTraining | Event.isCeltsTraining) .order_by(Event.isCeltsTraining) ) - if not attended: return None - if len(attended) > 1: - attended = attended[-1] - return attended.get().event + attended = attended[-1] if len(attended) > 1 else attended[0] + return attended.event