FIX: Show Settings button if plugin has settings (#9728)

It used to check if the plugin has an enabled_setting.
This commit is contained in:
Bianca Nenciu
2020-05-12 11:18:19 +03:00
committed by GitHub
parent a29ae17d3a
commit 16137308b0
2 changed files with 6 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ class AdminPluginSerializer < ApplicationSerializer
:admin_route,
:enabled,
:enabled_setting,
:has_settings,
:is_official
def id
@@ -38,6 +39,10 @@ class AdminPluginSerializer < ApplicationSerializer
object.enabled_site_setting
end
def has_settings
SiteSetting.plugins.values.include?(id)
end
def include_url?
url.present?
end