mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2025-08-16 03:40:26 +08:00
Load select_related
after update resource
This commit is contained in:
@ -103,6 +103,7 @@ async def update(
|
||||
obj = (
|
||||
await model.filter(pk=pk)
|
||||
.using_db(conn)
|
||||
.select_related(*model_resource.get_fk_field())
|
||||
.get()
|
||||
.prefetch_related(*model_resource.get_m2m_field())
|
||||
)
|
||||
|
Reference in New Issue
Block a user