Adding ability to add attachment points when editing augmented part
This commit is contained in:
1 parent
ceae27a12e
commit
d67b4ceb65
7 files changed
+355
-1
No files matched your search
@@ -16,6 +16,17 @@ async def get(db: AsyncSession, attachment_point_id: int) -> AttachmentPoint | N
|
||||
return await db.get(AttachmentPoint, attachment_point_id)
|
||||
|
||||
|
||||
async def list_for_augmented_part(
|
||||
db: AsyncSession, augmented_part_id: int
|
||||
) -> list[AttachmentPoint]:
|
||||
result = await db.execute(
|
||||
select(AttachmentPoint)
|
||||
.where(AttachmentPoint.augmented_part_id == augmented_part_id)
|
||||
.order_by(AttachmentPoint.id)
|
||||
)
|
||||
return list(result.scalars().all())
|
||||
|
||||
|
||||
async def list_all(
|
||||
db: AsyncSession, skip: int = 0, limit: int = 100
|
||||
) -> list[AttachmentPoint]:
|
||||
|
||||
Reference in new issue
Block a user