xnuinside / gino-admin

Admin Panel for GinoORM - ready to up & run (just add your models)
https://gino-admin.readthedocs.io/en/latest/
MIT License
49 stars 10 forks source link

TypeError: 'tuple' object is not callable - while trying to delete the category #41

Closed ShahriyarR closed 2 years ago

ShahriyarR commented 3 years ago

Got the following error while trying to delete data: delete_action_gino_admin

500_internal_server_error

[2021-05-24 20:16:18 +0400] - (sanic.access)[INFO][127.0.0.1:45260]: GET http://0.0.0.0:5000/admin/category/  200 15340
[2021-05-24 20:16:24 +0400] [29850] [DEBUG] KeepAlive Timeout. Closing connection.
[2021-05-24 20:16:42 +0400] [29850] [ERROR] Exception occurred while handling uri: 'http://0.0.0.0:5000/admin/category/delete/'
Traceback (most recent call last):
  File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/sanic/app.py", line 724, in handle_request
    response = await response
  File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/auth.py", line 37, in validate
    return await route(request, *args, **kwargs)
  File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/routes/crud.py", line 146, in model_delete
    return await model_view_table(request, model_id, flash_message)
TypeError: 'tuple' object is not callable
[2021-05-24 20:16:42 +0400] - (sanic.access)[INFO][127.0.0.1:45296]: POST http://0.0.0.0:5000/admin/category/delete/  500 1837
[2021-05-24 20:16:42 +0400] - (sanic.access)[INFO][127.0.0.1:45296]: GET http://0.0.0.0:5000/favicon.ico  404 673
xnuinside commented 3 years ago

@ShahriyarR , hi thanks for opening the issue, sorry for the long answer, I'm not sure when I can fix it, library in low priority for me right now, but if you want - you can open the PR and I will merge it

xnuinside commented 2 years ago

I tried to reproduce it & cannot if it still valid on 0.3.0 please re-open issue with more details - at least needed model that cause this issue