refactor: ruff format

This commit is contained in:
zhangx1n 2025-04-01 10:21:18 +08:00
parent 18362c38e7
commit 3a7ce5e27b
2 changed files with 9 additions and 3 deletions

View File

@ -55,8 +55,11 @@ class MemberInviteEmailApi(Resource):
inviter = current_user
invitation_results = []
console_web_url = dify_config.CONSOLE_WEB_URL
if (FeatureService.get_system_features().license.product_id == "DIFY_ENTERPRISE_STANDARD" and
len(invitee_emails) > FeatureService.get_features(tenant_id=inviter.current_tenant.id).available_team_members):
if (
FeatureService.get_system_features().license.product_id == "DIFY_ENTERPRISE_STANDARD"
and len(invitee_emails)
> FeatureService.get_features(tenant_id=inviter.current_tenant.id).available_team_members
):
return {
"code": "limit-exceeded",
"message": "Limit exceeded",

View File

@ -585,7 +585,10 @@ class TenantService:
if not FeatureService.get_system_features().is_allow_create_workspace and not is_setup:
raise WorkSpaceNotAllowedCreateError()
if FeatureService.get_system_features().license.product_id == "DIFY_ENTERPRISE_STANDARD" and FeatureService.get_system_features().available_workspaces <= 0:
if (
FeatureService.get_system_features().license.product_id == "DIFY_ENTERPRISE_STANDARD"
and FeatureService.get_system_features().available_workspaces <= 0
):
raise WorkSpaceNotAllowedCreateError()
if name: