summaryrefslogtreecommitdiff
path: root/app/services/users/update_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/users/update_service.rb')
-rw-r--r--app/services/users/update_service.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/app/services/users/update_service.rb b/app/services/users/update_service.rb
index e7e6d59df56..cc9c557e419 100644
--- a/app/services/users/update_service.rb
+++ b/app/services/users/update_service.rb
@@ -1,3 +1,5 @@
+require 'byebug'
+
module Users
class UpdateService < BaseService
include NewUserNotifier
@@ -13,13 +15,14 @@ module Users
user_exists = @user.persisted?
- if @params[:subscribed_pipelines]
- @params[:subscribed_pipelines].split(/\,/).each do |pipeline_id|
- Ci::Pipeline.find(pipeline_id).try do |pipeline|
- p '🔥'
- @user.subscribed_pipelines << pipeline
- end
+ if @params[:subscribed_pipeline]
+ Ci::Pipeline.find(@params[:subscribed_pipeline]).try do |pipeline|
+ p '🔥'
+ p pipeline
+ @user.subscribed_pipelines << pipeline
end
+
+ @params.delete(:subscribed_pipeline)
end
assign_attributes(&block)