Skip to content

Commit 371bbbf

Browse files
authored
fix REMOTE_INSTALL_URL, need default value (#141)
1 parent ddb87f8 commit 371bbbf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python/dify_plugin/config/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class DifyPluginEnv(BaseSettings):
2424
description="Installation method, local or network",
2525
)
2626

27-
REMOTE_INSTALL_URL: Optional[str] = Field(description="Remote installation URL")
27+
REMOTE_INSTALL_URL: Optional[str] = Field(default=None, description="Remote installation URL")
2828
REMOTE_INSTALL_HOST: str = Field(default="localhost", description="Remote installation host")
2929
REMOTE_INSTALL_PORT: int = Field(default=5003, description="Remote installation port")
3030
REMOTE_INSTALL_KEY: Optional[str] = Field(default=None, description="Remote installation key")

python/dify_plugin/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def _get_remote_install_host_and_port(config: DifyPluginEnv) -> tuple[str, int]:
398398
:return: host and port
399399
"""
400400
install_url = config.REMOTE_INSTALL_URL
401-
if install_url:
401+
if install_url is not None:
402402
if ":" in install_url:
403403
url = URL(install_url)
404404
if url.host and url.port:

0 commit comments

Comments
 (0)