Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

普通权限用户sql查询时报list indices must be integers or slices, not str #50

Closed
chenweida123 opened this issue Feb 15, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@chenweida123
Copy link

重现步骤
1.普通用户申请查询权限,管理员审批通过
2.普通用户选择相应的库进行查询报list indices must be integers or slices, not str
3.管理员用户查询任何表不会出现此错误。

错误日志
[2019-02-15 16:57:57,076][MainThread:139963200444224][task_id:default][query.py:578][ERROR]- Traceback (most recent call last):
File "/opt/archery/sql/query.py", line 495, in query
limit_num = priv_check_info['data']['limit_num']
TypeError: list indices must be integers or slices, not str

@hhyo hhyo added the bug Something isn't working label Feb 15, 2019
@hhyo hhyo self-assigned this Feb 15, 2019
@LeoQuote
Copy link
Collaborator

LeoQuote commented Feb 15, 2019

请问你使用的是什么版本 ? 是master还是什么? 是使用docker启动的还是clone代码直接启动的?

我们的新版本可能已经修复了这个问题.

@hhyo 要是有问题的话应该是 query_priv_check 函数有问题, 返回的结果不符合要求.

@hhyo
Copy link
Owner

hhyo commented Feb 15, 2019

@LeoQuote 是的,遗漏了一个else,晚上修复

@hhyo hhyo closed this as completed in 950a553 Feb 15, 2019
kjiLupin pushed a commit to kjiLupin/Archery that referenced this issue Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants