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

TypeError: get() takes no keyword arguments #82

Open
JirroReo opened this issue Feb 21, 2023 · 0 comments
Open

TypeError: get() takes no keyword arguments #82

JirroReo opened this issue Feb 21, 2023 · 0 comments

Comments

@JirroReo
Copy link

Error message:

File "/usr/local/lib/python3.5/dist-packages/django_su/context_processors.py", line 5, in is_su
    return {"IS_SU": len(request.session.get("exit_users_pk", default=[]))}
TypeError: get() takes no keyword arguments

It may be a good idea to refactor this line into:

return {"IS_SU": len(request.session.get("exit_users_pk", []))}

See: https://stackoverflow.com/questions/24463202/typeerror-get-takes-no-keyword-arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant