TypeError at /short_search/
object of type 'bool' has no len()
Request Method: GET
Request URL: http://localhost:8000/short_search/?page=2
Django Version: 1.11.3
Exception Type: TypeError
Exception Value:
object of type 'bool' has no len()
Exception Location: /home/alex/www/pravrabota/Env/lib/python3.5/site-packages/django/core/paginator.py in count, line 84
Python Executable: /home/alex/www/pravrabota/Env/bin/python
Python Version: 3.5.2
Python Path:
['/home/alex/www/pravrabota/project',
'/home/alex/www/pravrabota/Env/lib/python35.zip',
'/home/alex/www/pravrabota/Env/lib/python3.5',
'/home/alex/www/pravrabota/Env/lib/python3.5/plat-x86_64-linux-gnu',
'/home/alex/www/pravrabota/Env/lib/python3.5/lib-dynload',
'/usr/lib/python3.5',
'/usr/lib/python3.5/plat-x86_64-linux-gnu',
'/home/alex/www/pravrabota/Env/lib/python3.5/site-packages']
Server time: Пт, 25 Авг 2017 11:01:42 +0300
def dispatch(self, request, *args, **kwargs):
handler = super().dispatch(request, *args, **kwargs)
user = request.user
profile = self.get_object()
if not (profile.user == user or user.is_superuser):
raise PermissionDenied
return handler