From ae0e2afc92337bc93e2cc8c34c94b9514c772e47 Mon Sep 17 00:00:00 2001 From: Dani Donisa Date: Thu, 5 Oct 2023 18:32:32 +0200 Subject: [PATCH] Make NotifiedProjects always return an array --- src/api/app/services/notified_projects.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/app/services/notified_projects.rb b/src/api/app/services/notified_projects.rb index a4ba8babca7..206456176d0 100644 --- a/src/api/app/services/notified_projects.rb +++ b/src/api/app/services/notified_projects.rb @@ -14,18 +14,18 @@ def call when 'Comment' case @notifiable.commentable_type when 'Project' - @notifiable.commentable + [@notifiable.commentable] when 'Package' - @notifiable.commentable.project + [@notifiable.commentable.project] when 'BsRequest' @notifiable.commentable.target_project_objects.distinct when 'BsRequestAction' @notifiable.commentable.bs_request.target_project_objects.distinct end when 'Package' - @notifiable.project + [@notifiable.project] when 'Project' - @notifiable + [@notifiable] when 'Report', 'Decision' [] end