Commit 0fcfb496 authored by Per Lundberg's avatar Per Lundberg

Fix 'private method 'load' called' when posting non-whitelisted webhook

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/221294

Changelog: fixed
parent fff0d177
...@@ -8,7 +8,7 @@ class Admin::HooksController < Admin::ApplicationController ...@@ -8,7 +8,7 @@ class Admin::HooksController < Admin::ApplicationController
feature_category :integrations feature_category :integrations
def index def index
@hooks = SystemHook.all @hooks = SystemHook.all.load
@hook = SystemHook.new @hook = SystemHook.new
end end
......
...@@ -15,7 +15,7 @@ class Projects::HooksController < Projects::ApplicationController ...@@ -15,7 +15,7 @@ class Projects::HooksController < Projects::ApplicationController
feature_category :integrations feature_category :integrations
def index def index
@hooks = @project.hooks @hooks = @project.hooks.load
@hook = ProjectHook.new @hook = ProjectHook.new
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.card-header .card-header
%h5 %h5
= hook_class.underscore.humanize.titleize.pluralize = hook_class.underscore.humanize.titleize.pluralize
(#{hooks.load.size}) (#{hooks.size})
- if hooks.any? - if hooks.any?
%ul.content-list %ul.content-list
......
...@@ -17,7 +17,7 @@ class Groups::HooksController < Groups::ApplicationController ...@@ -17,7 +17,7 @@ class Groups::HooksController < Groups::ApplicationController
feature_category :integrations feature_category :integrations
def index def index
@hooks = @group.hooks @hooks = @group.hooks.load
@hook = GroupHook.new @hook = GroupHook.new
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment