Skip to content

Commit

Permalink
Merge pull request #15006 from danidoni/make-notified-projects-always…
Browse files Browse the repository at this point in the history
…-return-a-collection

Make NotifiedProjects always return an array
  • Loading branch information
danidoni committed Oct 5, 2023
2 parents 0c5436c + ae0e2af commit c66dc31
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 c66dc31

Please sign in to comment.