Skip to content

Commit

Permalink
Make NotifiedProjects always return an array
Browse files Browse the repository at this point in the history
  • Loading branch information
danidoni authored and Dani Donisa committed Oct 5, 2023
1 parent 0c5436c commit ae0e2af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/app/services/notified_projects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ae0e2af

Please sign in to comment.