Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicole Cordes <cordes@cps-it.de>2014-09-04 00:28:04 +0400
committerNicole Cordes <cordes@cps-it.de>2015-03-10 12:07:25 +0300
commitb7a31a4b024e2c5f607003f1c42e2cd46adb2ff4 (patch)
treeb525911165dcb33506f18421f3c935b45cfda122 /app/services/system_hooks_service.rb
parente0caed91e2cd6b959f808139df7c40f3644f88fd (diff)
Generate valid json for hooks
It seems that ruby can handle 'nil' value but other json processors (like PHP) throw an error. This is always generated for empty arrays.
Diffstat (limited to 'app/services/system_hooks_service.rb')
-rw-r--r--app/services/system_hooks_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/system_hooks_service.rb b/app/services/system_hooks_service.rb
index 46f6e91e808..c5d0b08845b 100644
--- a/app/services/system_hooks_service.rb
+++ b/app/services/system_hooks_service.rb
@@ -41,7 +41,7 @@ class SystemHooksService
path_with_namespace: model.path_with_namespace,
project_id: model.id,
owner_name: owner.name,
- owner_email: owner.respond_to?(:email) ? owner.email : nil,
+ owner_email: owner.respond_to?(:email) ? owner.email : "",
project_visibility: Project.visibility_levels.key(model.visibility_level_field).downcase
})
when User