Formatting everything with black
This commit is contained in:
1 parent
42a11c0dc6
commit
a3539beda9
20 files changed
+173
-18
No files matched your search
+9
-3
@@ -52,7 +52,9 @@ async def get_role(
|
||||
):
|
||||
role = await role_crud.get(db, role_id)
|
||||
if role is None:
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Role not found")
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="Role not found"
|
||||
)
|
||||
return role
|
||||
|
||||
|
||||
@@ -65,7 +67,9 @@ async def update_role(
|
||||
):
|
||||
role = await role_crud.get(db, role_id)
|
||||
if role is None:
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Role not found")
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="Role not found"
|
||||
)
|
||||
return await role_crud.update(db, role, payload.model_dump(exclude_unset=True))
|
||||
|
||||
|
||||
@@ -77,5 +81,7 @@ async def delete_role(
|
||||
):
|
||||
role = await role_crud.get(db, role_id)
|
||||
if role is None:
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Role not found")
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="Role not found"
|
||||
)
|
||||
await role_crud.delete(db, role)
|
||||
Reference in new issue
Block a user