Reformatting everything with black
This commit is contained in:
1 parent
7bd07f084a
commit
8185f1f8b3
48 files changed
+1000
-348
No files matched your search
@@ -40,7 +40,9 @@ async def list_attachment_points(
|
||||
return await attachment_point_crud.list_all(db, skip=skip, limit=limit)
|
||||
|
||||
|
||||
@router.post("", response_model=AttachmentPointRead, status_code=status.HTTP_201_CREATED)
|
||||
@router.post(
|
||||
"", response_model=AttachmentPointRead, status_code=status.HTTP_201_CREATED
|
||||
)
|
||||
async def create_attachment_point(
|
||||
payload: AttachmentPointCreate,
|
||||
db: AsyncSession = Depends(get_db),
|
||||
@@ -59,7 +61,10 @@ async def create_attachment_point(
|
||||
)
|
||||
ap = await attachment_point_crud.create(db, **payload.model_dump())
|
||||
await audit_crud.log(
|
||||
db, actor=actor, action="create", resource_type="AttachmentPoint",
|
||||
db,
|
||||
actor=actor,
|
||||
action="create",
|
||||
resource_type="AttachmentPoint",
|
||||
resource_id=ap.id,
|
||||
description=audit_crud.describe_create(
|
||||
"AttachmentPoint", ap.id, _connection_label(ap)
|
||||
@@ -93,7 +98,10 @@ async def update_attachment_point(
|
||||
changes = payload.model_dump(exclude_unset=True)
|
||||
ap = await attachment_point_crud.update(db, ap, changes)
|
||||
await audit_crud.log(
|
||||
db, actor=actor, action="update", resource_type="AttachmentPoint",
|
||||
db,
|
||||
actor=actor,
|
||||
action="update",
|
||||
resource_type="AttachmentPoint",
|
||||
resource_id=ap.id,
|
||||
description=audit_crud.describe_update("AttachmentPoint", ap.id, changes),
|
||||
)
|
||||
@@ -112,7 +120,12 @@ async def delete_attachment_point(
|
||||
label = _connection_label(ap)
|
||||
await attachment_point_crud.delete(db, ap)
|
||||
await audit_crud.log(
|
||||
db, actor=actor, action="delete", resource_type="AttachmentPoint",
|
||||
db,
|
||||
actor=actor,
|
||||
action="delete",
|
||||
resource_type="AttachmentPoint",
|
||||
resource_id=attachment_point_id,
|
||||
description=audit_crud.describe_delete("AttachmentPoint", attachment_point_id, label),
|
||||
description=audit_crud.describe_delete(
|
||||
"AttachmentPoint", attachment_point_id, label
|
||||
),
|
||||
)
|
||||
Reference in new issue
Block a user