liuhua
liuhua
commited on
Commit
·
a5ad625
1
Parent(s):
faeb38f
Update error message for agent name conflict (#4299)
Browse files### What problem does this PR solve?
Update error message for agent name conflict
### Type of change
- [x] Refactoring
Co-authored-by: liuhua <[email protected]>
- api/apps/canvas_app.py +1 -1
api/apps/canvas_app.py
CHANGED
@@ -65,7 +65,7 @@ def save():
|
|
65 |
req["dsl"] = json.loads(req["dsl"])
|
66 |
if "id" not in req:
|
67 |
if UserCanvasService.query(user_id=current_user.id, title=req["title"].strip()):
|
68 |
-
return get_data_error_result(f"{req['title'].strip()} already exists.")
|
69 |
req["id"] = get_uuid()
|
70 |
if not UserCanvasService.save(**req):
|
71 |
return get_data_error_result(message="Fail to save canvas.")
|
|
|
65 |
req["dsl"] = json.loads(req["dsl"])
|
66 |
if "id" not in req:
|
67 |
if UserCanvasService.query(user_id=current_user.id, title=req["title"].strip()):
|
68 |
+
return get_data_error_result(message=f"{req['title'].strip()} already exists.")
|
69 |
req["id"] = get_uuid()
|
70 |
if not UserCanvasService.save(**req):
|
71 |
return get_data_error_result(message="Fail to save canvas.")
|