mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2025-06-05 21:59:23 +02:00
Fix admin profile
This commit is contained in:
15
app/admin.py
15
app/admin.py
@ -513,6 +513,7 @@ async def admin_profile(
|
|||||||
actors_metadata = await get_actors_metadata(db_session, [actor])
|
actors_metadata = await get_actors_metadata(db_session, [actor])
|
||||||
|
|
||||||
inbox_objects = (
|
inbox_objects = (
|
||||||
|
(
|
||||||
await db_session.scalars(
|
await db_session.scalars(
|
||||||
select(models.InboxObject)
|
select(models.InboxObject)
|
||||||
.where(
|
.where(
|
||||||
@ -522,9 +523,21 @@ async def admin_profile(
|
|||||||
["Note", "Article", "Video", "Page", "Announce"]
|
["Note", "Article", "Video", "Page", "Announce"]
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
.options(
|
||||||
|
joinedload(models.InboxObject.relates_to_inbox_object),
|
||||||
|
joinedload(models.InboxObject.relates_to_outbox_object).options(
|
||||||
|
joinedload(
|
||||||
|
models.OutboxObject.outbox_object_attachments
|
||||||
|
).options(joinedload(models.OutboxObjectAttachment.upload)),
|
||||||
|
),
|
||||||
|
joinedload(models.InboxObject.actor),
|
||||||
|
)
|
||||||
.order_by(models.InboxObject.ap_published_at.desc())
|
.order_by(models.InboxObject.ap_published_at.desc())
|
||||||
)
|
)
|
||||||
).all()
|
)
|
||||||
|
.unique()
|
||||||
|
.all()
|
||||||
|
)
|
||||||
|
|
||||||
return await templates.render_template(
|
return await templates.render_template(
|
||||||
db_session,
|
db_session,
|
||||||
|
Reference in New Issue
Block a user