From cbdfb4ac898275cc3164948b420beb1a9282bbda Mon Sep 17 00:00:00 2001 From: FinnIckler Date: Fri, 8 Nov 2024 16:19:35 +0100 Subject: [PATCH] fix qualification being checked if event_ids are not present --- app/services/registration_checker.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/registration_checker.rb b/app/services/registration_checker.rb index a0a50566..7112526a 100644 --- a/app/services/registration_checker.rb +++ b/app/services/registration_checker.rb @@ -106,6 +106,7 @@ def validate_qualifications! return unless @competition_info.enforces_qualifications? # TODO: Read the request payload in as an object, and handle cases where expected values aren't found event_ids = @request.dig('competing', 'event_ids') + return if event_ids.nil? unqualified_events = event_ids.filter_map do |event| qualification = @competition_info.get_qualification_for(event)