Skip to content

Commit b21b870

Browse files
committed
move the refresh inside the connection context manager where it should be
1 parent 9af95b4 commit b21b870

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rasenmaeher_api/db/people.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ async def update_from_kcdata(cls, kcdata: Dict[str, Any], person: Optional["Pers
7272
async with db.acquire() as conn:
7373
async with conn.transaction(): # do it in a transaction so if something fails we can roll back
7474
await person.update(extra=person.extra).apply()
75-
refresh = await cls.by_pk(person.pk)
76-
return refresh
75+
refresh = await cls.by_pk(person.pk)
76+
return refresh
7777
except Exception as exc:
7878
raise BackendError(str(exc)) from exc
7979

0 commit comments

Comments
 (0)