diff options
Diffstat (limited to 'app/services/system_hooks_service.rb')
-rw-r--r-- | app/services/system_hooks_service.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/system_hooks_service.rb b/app/services/system_hooks_service.rb index c872b27ba39..39aec943f75 100644 --- a/app/services/system_hooks_service.rb +++ b/app/services/system_hooks_service.rb @@ -23,13 +23,15 @@ class SystemHooksService case model when Project + owner = model.owner + data.merge!({ name: model.name, path: model.path, path_with_namespace: model.path_with_namespace, project_id: model.id, - owner_name: model.owner.name, - owner_email: model.owner.email + owner_name: owner.name, + owner_email: owner.respond_to?(:email) ? owner.email : nil }) when User data.merge!({ |