Fix admin outbox query
parent
d058c1ba26
commit
952b28ece7
12
app/boxes.py
12
app/boxes.py
|
@ -454,6 +454,7 @@ async def get_outbox_object_by_ap_id(
|
|||
db_session: AsyncSession, ap_id: str
|
||||
) -> models.OutboxObject | None:
|
||||
return (
|
||||
(
|
||||
await db_session.execute(
|
||||
select(models.OutboxObject)
|
||||
.where(models.OutboxObject.ap_id == ap_id)
|
||||
|
@ -465,13 +466,16 @@ async def get_outbox_object_by_ap_id(
|
|||
joinedload(models.InboxObject.actor),
|
||||
),
|
||||
joinedload(models.OutboxObject.relates_to_outbox_object).options(
|
||||
joinedload(models.OutboxObject.outbox_object_attachments).options(
|
||||
joinedload(models.OutboxObjectAttachment.upload)
|
||||
),
|
||||
joinedload(
|
||||
models.OutboxObject.outbox_object_attachments
|
||||
).options(joinedload(models.OutboxObjectAttachment.upload)),
|
||||
),
|
||||
)
|
||||
)
|
||||
).scalar_one_or_none() # type: ignore
|
||||
)
|
||||
.unique()
|
||||
.scalar_one_or_none()
|
||||
) # type: ignore
|
||||
|
||||
|
||||
async def get_anybox_object_by_ap_id(
|
||||
|
|
Loading…
Reference in New Issue