From 4439004fbc8db0d4d2dba788cfdd839472e5338e Mon Sep 17 00:00:00 2001 From: nofaralfasi Date: Thu, 11 Jan 2024 12:17:16 +0200 Subject: [PATCH] Fixes #37014 - set correct Host owner during registration --- .../concerns/api/v2/registration_controller_extensions.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb b/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb index ef5cc1dc06f..c44b01cabd2 100644 --- a/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +++ b/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb @@ -11,6 +11,7 @@ def prepare_host fail ActiveRecord::RecordNotFound, msg end @host.assign_attributes(host_params('host')) + @host.owner = User.current @host.save! else super