mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 05:55:59 +08:00
Fix abnormal user invitaion message. (#4081)
### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
f8c9ec4d56
commit
f8cef73244
@ -62,8 +62,10 @@ def create(tenant_id):
|
||||
user_id = usrs[0].id
|
||||
user_tenants = UserTenantService.query(user_id=user_id, tenant_id=tenant_id)
|
||||
if user_tenants:
|
||||
if user_tenants[0].status == UserTenantRole.NORMAL.value:
|
||||
if user_tenants[0].role == UserTenantRole.NORMAL:
|
||||
return get_data_error_result(message="This user is in the team already.")
|
||||
if user_tenants[0].role == UserTenantRole.OWNER:
|
||||
return get_data_error_result(message="This user is the owner of the team.")
|
||||
return get_data_error_result(message="Invitation notification is sent.")
|
||||
|
||||
UserTenantService.save(
|
||||
|
Loading…
x
Reference in New Issue
Block a user