Fix admin profile
This commit is contained in:
parent
b9d44da06e
commit
cabc74f5cd
1 changed files with 23 additions and 10 deletions
33
app/admin.py
33
app/admin.py
|
@ -513,18 +513,31 @@ 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(
|
(
|
||||||
select(models.InboxObject)
|
await db_session.scalars(
|
||||||
.where(
|
select(models.InboxObject)
|
||||||
models.InboxObject.is_deleted.is_(False),
|
.where(
|
||||||
models.InboxObject.actor_id == actor.id,
|
models.InboxObject.is_deleted.is_(False),
|
||||||
models.InboxObject.ap_type.in_(
|
models.InboxObject.actor_id == actor.id,
|
||||||
["Note", "Article", "Video", "Page", "Announce"]
|
models.InboxObject.ap_type.in_(
|
||||||
),
|
["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,
|
||||||
|
|
Loading…
Reference in a new issue