refactor(services/tasks): Swtich to dify_config witch Pydantic (#6203)

This commit is contained in:
Waffle
2024-07-12 12:25:38 +08:00
committed by GitHub
parent d7a6f25c63
commit 7b225a5ab0
15 changed files with 51 additions and 53 deletions

View File

@@ -1,7 +1,7 @@
from flask import current_app
from flask_login import current_user
from configs import dify_config
from extensions.ext_database import db
from models.account import Tenant, TenantAccountJoin, TenantAccountJoinRole
from services.account_service import TenantService
@@ -35,7 +35,7 @@ class WorkspaceService:
if can_replace_logo and TenantService.has_roles(tenant,
[TenantAccountJoinRole.OWNER, TenantAccountJoinRole.ADMIN]):
base_url = current_app.config.get('FILES_URL')
base_url = dify_config.FILES_URL
replace_webapp_logo = f'{base_url}/files/workspaces/{tenant.id}/webapp-logo' if tenant.custom_config_dict.get('replace_webapp_logo') else None
remove_webapp_brand = tenant.custom_config_dict.get('remove_webapp_brand', False)