Skip to content

Commit

Permalink
fix plugin api
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Jul 23, 2023
1 parent c21aed6 commit d56eb14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/core/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_plugin_form(self, pid: str) -> Tuple[List[dict], Dict[str, Any]]:
if not self._running_plugins.get(pid):
return [], {}
if hasattr(self._running_plugins[pid], "get_form"):
return self._running_plugins[pid].get_form()
return self._running_plugins[pid].get_form() or ([], {})
return [], {}

def get_plugin_page(self, pid: str) -> List[dict]:
Expand All @@ -108,7 +108,7 @@ def get_plugin_page(self, pid: str) -> List[dict]:
if not self._running_plugins.get(pid):
return []
if hasattr(self._running_plugins[pid], "get_page"):
return self._running_plugins[pid].get_page()
return self._running_plugins[pid].get_page() or []
return []

def get_plugin_commands(self) -> List[Dict[str, Any]]:
Expand Down

0 comments on commit d56eb14

Please sign in to comment.