🔧 fix(base.py): fix comment indentation for better readability
🔧 fix(users.py): fix code formatting and indentation for better readability
This commit is contained in:
parent
4010f5669e
commit
c7b500dd5c
2 changed files with 5 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ class FrontendNodeRequest(FrontendNode):
|
||||||
class ValidatePromptRequest(BaseModel):
|
class ValidatePromptRequest(BaseModel):
|
||||||
name: str
|
name: str
|
||||||
template: str
|
template: str
|
||||||
#optional for tweak call
|
# optional for tweak call
|
||||||
frontend_node: Optional[FrontendNodeRequest]
|
frontend_node: Optional[FrontendNodeRequest]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ class CodeValidationResponse(BaseModel):
|
||||||
|
|
||||||
class PromptValidationResponse(BaseModel):
|
class PromptValidationResponse(BaseModel):
|
||||||
input_variables: list
|
input_variables: list
|
||||||
#object return for tweak call
|
# object return for tweak call
|
||||||
frontend_node: FrontendNodeRequest | object
|
frontend_node: FrontendNodeRequest | object
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,9 @@ def add_user(
|
||||||
db.refresh(new_user)
|
db.refresh(new_user)
|
||||||
except IntegrityError as e:
|
except IntegrityError as e:
|
||||||
db.rollback()
|
db.rollback()
|
||||||
raise HTTPException(status_code=400, detail="This username is unavailable.") from e
|
raise HTTPException(
|
||||||
|
status_code=400, detail="This username is unavailable."
|
||||||
|
) from e
|
||||||
|
|
||||||
return new_user
|
return new_user
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue