xnuinside/gino-admin

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

ShahriyarR opened this issue · 2 comments

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

@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

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