summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-03-30 16:29:42 -0500
committerJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-04-16 07:21:28 -0400
commit05628e0c2ffc5a3378ad4d89a212b1bd652a9d60 (patch)
tree812c224d8cc5817e3dc786fc6ad72f00ab380a18 /app/services
parent16459fddd4857bc18a917e13989b755468cfd7e8 (diff)
downloadgitlab-ce-05628e0c2ffc5a3378ad4d89a212b1bd652a9d60.tar.gz
Fixes failing spec
Diffstat (limited to 'app/services')
-rw-r--r--app/services/projects/participants_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/projects/participants_service.rb b/app/services/projects/participants_service.rb
index 800747b7ef6..1eaecc0d270 100644
--- a/app/services/projects/participants_service.rb
+++ b/app/services/projects/participants_service.rb
@@ -25,6 +25,8 @@ module Projects
end
def target_owner
+ return [] unless @target && @target.author.present?
+
[{
name: @target.author.name,
username: @target.author.username