Commit b4b2b810 authored by Tetiana Chupryna's avatar Tetiana Chupryna

Workaround instance variable issue

parent 1b238156
...@@ -21,11 +21,11 @@ module Projects ...@@ -21,11 +21,11 @@ module Projects
private private
def configuration def configuration
@configuration ||= if unify_configuration_enabled? if unify_configuration_enabled?
configuration_presenter configuration_presenter
else else
{} {}
end end
end end
def configuration_presenter def configuration_presenter
......
...@@ -32,12 +32,12 @@ module EE ...@@ -32,12 +32,12 @@ module EE
def show def show
return super unless security_dashboard_feature_enabled? && can_read_security_dashboard? return super unless security_dashboard_feature_enabled? && can_read_security_dashboard?
configuration @configuration ||= configuration_presenter
respond_to do |format| respond_to do |format|
format.html format.html
format.json do format.json do
render status: :ok, json: configuration.to_h render status: :ok, json: @configuration.to_h
end end
end end
end end
...@@ -76,11 +76,6 @@ module EE ...@@ -76,11 +76,6 @@ module EE
render_404 if ::Feature.disabled?(:security_auto_fix, project) render_404 if ::Feature.disabled?(:security_auto_fix, project)
end end
override :configuration
def configuration
@configuration ||= configuration_presenter
end
def security_dashboard_feature_enabled? def security_dashboard_feature_enabled?
vulnerable.feature_available?(:security_dashboard) vulnerable.feature_available?(:security_dashboard)
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