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

'bool' object is not callable in Django 2.0.2 #1

Closed
mayait opened this issue Feb 1, 2018 · 5 comments
Closed

'bool' object is not callable in Django 2.0.2 #1

mayait opened this issue Feb 1, 2018 · 5 comments
Assignees
Labels

Comments

@mayait
Copy link

mayait commented Feb 1, 2018

Internal Server Error: /admin/
Traceback (most recent call last):
File "/Users/juli/dev/leansew/env/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/Users/juli/dev/leansew/env/lib/python3.6/site-packages/speedinfo/middleware.py", line 112, in call
return self.process_response(request, response)
File "/Users/juli/dev/leansew/env/lib/python3.6/site-packages/speedinfo/middleware.py", line 90, in process_response
is_anon_call = request.user.is_anonymous()
TypeError: 'bool' object is not callable

@mayait
Copy link
Author

mayait commented Feb 1, 2018

I'm aware that "Using User.is_authenticated() and User.is_anonymous() as methods rather than properties is no longer supported." but I don't know where to fix it.

@mayait
Copy link
Author

mayait commented Feb 1, 2018

Fix in line 90: speedinfo/backends
is_anon_call = request.user.is_anonymous

@catcombo catcombo self-assigned this Feb 7, 2018
@catcombo catcombo added the bug label Feb 7, 2018
@catcombo
Copy link
Owner

catcombo commented Feb 7, 2018

@mayait Hey Julian! Sorry for delay. Thank you for the bug report. Fixed in 1.3.1 release.

@catcombo catcombo closed this as completed Feb 7, 2018
@jeankyle
Copy link

Fix in line 90: speedinfo/backends
is_anon_call = request.user.is_anonymous

Removing the parantheses in 'if request.user.is_authenticated() and cart_obj.user is None:' fixed my issue. Thannks!

@vikraman-melorra
Copy link

vikraman-melorra commented Jan 19, 2021

is_anon_call = request.user.is_anonymous
its useful one thanks

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

No branches or pull requests

4 participants