1
0
mirror of https://git.sr.ht/~tsileo/microblog.pub synced 2025-06-05 21:59:23 +02:00

Tweak middleware

This commit is contained in:
Thomas Sileo
2022-07-14 15:16:45 +02:00
parent a39f874ad5
commit d245201851
2 changed files with 11 additions and 35 deletions

View File

@ -145,8 +145,7 @@ async def save_actor(db_session: AsyncSession, ap_actor: ap.RawObject) -> "Actor
handle=_handle(ap_actor),
)
db_session.add(actor)
await db_session.commit()
await db_session.refresh(actor)
await db_session.flush()
return actor