catcombo/django-speedinfo

'bool' object is not callable in Django 2.0.2

mayait opened this issue ยท 5 comments

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

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.

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

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

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!

is_anon_call = request.user.is_anonymous
its useful one thanks