From 11c681019e5f19552ee5ba403ebafaf85c9621cb Mon Sep 17 00:00:00 2001 From: Jason C Date: Mon, 29 Apr 2024 10:57:47 -0700 Subject: [PATCH] Protect against calling `.any?` on a non-array (#16547) Co-authored-by: Tonksthebear --- .../mobile/app/controllers/mobile/v0/appointments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mobile/app/controllers/mobile/v0/appointments_controller.rb b/modules/mobile/app/controllers/mobile/v0/appointments_controller.rb index adff7bb4ea5..8d5df43cb58 100644 --- a/modules/mobile/app/controllers/mobile/v0/appointments_controller.rb +++ b/modules/mobile/app/controllers/mobile/v0/appointments_controller.rb @@ -99,7 +99,7 @@ def get_response_status(failures) end def appointment_errors?(failures) - failures.any? { |failure| failure[:appointment_errors].present? } + Array.wrap(failures).any? { |failure| failure[:appointment_errors].present? } end def filter_by_date_range(appointments)