Skip to content

Commit

Permalink
fix(knowledge API): Unique Constraint Issue with create_space API Cau… (
Browse files Browse the repository at this point in the history
#1794)

Co-authored-by: aries_ckt <[email protected]>
  • Loading branch information
chaplinthink and Aries-ckt authored Aug 9, 2024
1 parent c30670b commit 621c5a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dbgpt/serve/rag/service/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ def create_space(self, request: SpaceServeRequest) -> SpaceServeResponse:
Returns:
SpaceServeResponse: The response
"""
space = self.get(request)
query = {
"name": request.name
}
space = self.get(query)
if space is not None:
raise HTTPException(
status_code=400,
Expand Down

0 comments on commit 621c5a3

Please sign in to comment.