mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2026-03-13 10:32:25 +08:00
Fix ForeignKey select menu
This commit is contained in:
@@ -171,8 +171,7 @@ class Model(Resource):
|
||||
name = input_.context.get("name")
|
||||
if isinstance(input_, inputs.ForeignKey):
|
||||
v = data.getlist(name)[0]
|
||||
model = await input_.model.get(id=v)
|
||||
ret[name] = model
|
||||
ret[name] = int(v) if v else None
|
||||
continue
|
||||
if isinstance(input_, inputs.ManyToMany):
|
||||
v = data.getlist(name)
|
||||
|
||||
Reference in New Issue
Block a user