Skip to content

Commit

Permalink
fix(idp_plugin): id error when register custom plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nannan00 committed Jan 22, 2024
1 parent a763576 commit 4a68f73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/idp-plugins/idp_plugins/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def register_plugin(plugin_cls: Type[BaseCredentialIdpPlugin] | Type[BaseFederat
raise RuntimeError(f"plugin {plugin_cls} not provide config_class")

# 非内建插件,id 必须以 custom_ 为前缀
if plugin_id not in BuiltinIdpPluginIDs and plugin_id.startswith(CUSTOM_PLUGIN_ID_PREFIX):
if plugin_id not in BuiltinIdpPluginIDs and not plugin_id.startswith(CUSTOM_PLUGIN_ID_PREFIX):
raise RuntimeError(f"custom plugin's id must start with `{CUSTOM_PLUGIN_ID_PREFIX}`")

logger.info("register idp plugin: %s", plugin_id)
Expand Down

0 comments on commit 4a68f73

Please sign in to comment.