mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2025-08-26 10:40:18 +08:00
Fix get_model
This commit is contained in:
@ -14,7 +14,8 @@ def get_model(resource: Optional[str] = Path(...)):
|
||||
if not resource:
|
||||
return
|
||||
for app, models in Tortoise.apps.items():
|
||||
model = models.get(resource.title())
|
||||
models = {key.lower(): val for key, val in models.items()}
|
||||
model = models.get(resource)
|
||||
if model:
|
||||
return model
|
||||
|
||||
|
Reference in New Issue
Block a user