Skip to content

Commit

Permalink
Merge pull request #247 from salopensource/fix_246
Browse files Browse the repository at this point in the history
Do a better job filtering out plugins during settings page displays.
  • Loading branch information
grahamgilbert authored Apr 26, 2018
2 parents 2d5ccb3 + a9e87cf commit d13a5b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,12 @@ def get_active_and_inactive_plugins(plugin_kind='machines'):
if not isinstance(plugin, plugin_type):
if not isinstance(plugin, OldPluginAdapter):
continue
elif DEPRECATED_PLUGIN_TYPES[plugin.get_plugin_type()] != plugin_type:
# If there's no type method, assume it's basically Widget.
elif not hasattr(plugin, 'get_plugin_type') and plugin_type != Widget:
continue
# Finally, look up known 'types' in table, assuming it's a
# Widget if it's an unknown type.
elif DEPRECATED_PLUGIN_TYPES.get(plugin.get_plugin_type(), Widget) != plugin_type:
continue

try:
Expand Down

0 comments on commit d13a5b6

Please sign in to comment.