Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: handle case where member is not found in role update API (#12156)

-LAN-55c327ffcbb8
diff --git a/api/controllers/console/workspace/members.py b/api/controllers/console/workspace/members.py
index 1afb41ea876..a2b41c1d38f 100644
--- a/api/controllers/console/workspace/members.py
+++ b/api/controllers/console/workspace/members.py
@@ -122,7 +122,7 @@ class MemberUpdateRoleApi(Resource):
return {"code": "invalid-role", "message": "Invalid role"}, 400
member = db.session.get(Account, str(member_id))
- if member:
+ if not member:
abort(404)
try: