Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #55 from nisxiya/bug/fix-cancel-label-bug
Browse files Browse the repository at this point in the history
Fix bug: cancel_label does not work
  • Loading branch information
李聪 committed Aug 9, 2018
2 parents 1061ffd + 5e37670 commit abe4968
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/curve/v1/services/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ def __call__(self, method, *args):
:param args: args to run
:return:
"""
if method not in self.PLUGIN_METHOD.keys() + Plugin.get_menus():
# actions_in_menu is a list of user actions, E.g. ['cancel_label']
actions_in_menu = [m[0] for m in Plugin.get_menus()]
if method not in self.PLUGIN_METHOD.keys() + actions_in_menu:
return None
res = []
for _, plugin in sorted(Plugin.__get_plugins().items()):
Expand Down Expand Up @@ -317,7 +319,7 @@ def _after_init_band(plugin_name, bands):
def get_menus():
"""
get menu list
:return:
:return: [(action, menu_name)]
"""
if Plugin.menus is None:
Plugin.menus = []
Expand Down

0 comments on commit abe4968

Please sign in to comment.