{"action":"created","issue":{"url":"https://api.github.com/repos/chibisov/drf-extensions/issues/200","repository_url":"https://api.github.com/repos/chibisov/drf-extensions","labels_url":"https://api.github.com/repos/chibisov/drf-extensions/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/chibisov/drf-extensions/issues/200/comments","events_url":"https://api.github.com/repos/chibisov/drf-extensions/issues/200/events","html_url":"https://github.com/chibisov/drf-extensions/issues/200","id":282438879,"number":200,"title":"[Django 2.0] TypeError: 'bool' object is not callable ","user":{"login":"mbaragiola","id":3682895,"avatar_url":"https://avatars3.githubusercontent.com/u/3682895?v=4","gravatar_id":"","url":"https://api.github.com/users/mbaragiola","html_url":"https://github.com/mbaragiola","followers_url":"https://api.github.com/users/mbaragiola/followers","following_url":"https://api.github.com/users/mbaragiola/following{/other_user}","gists_url":"https://api.github.com/users/mbaragiola/gists{/gist_id}","starred_url":"https://api.github.com/users/mbaragiola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbaragiola/subscriptions","organizations_url":"https://api.github.com/users/mbaragiola/orgs","repos_url":"https://api.github.com/users/mbaragiola/repos","events_url":"https://api.github.com/users/mbaragiola/events{/privacy}","received_events_url":"https://api.github.com/users/mbaragiola/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-12-15T14:11:25Z","updated_at":"2018-03-08T14:55:52Z","closed_at":"2018-03-08T14:55:52Z","author_association":"NONE","body":"Hello, getting this error with Django 2.0, Python 3.6.3 and `master` branch of `drf-extensions`:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/app/users/v1/tests/tests.py\", line 278, in test_update\r\n    response = self.client.get(url)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework/test.py\", line 291, in get\r\n    response = super(APIClient, self).get(path, data=data, **extra)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework/test.py\", line 208, in get\r\n    return self.generic('GET', path, **r)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework/test.py\", line 237, in generic\r\n    method, path, data, content_type, secure, **extra)\r\n  File \"/usr/local/lib/python3.6/site-packages/django/test/client.py\", line 404, in generic\r\n    return self.request(**r)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework/test.py\", line 288, in request\r\n    return super(APIClient, self).request(**kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework/test.py\", line 240, in request\r\n    request = super(APIRequestFactory, self).request(**kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/django/test/client.py\", line 485, in request\r\n    raise exc_value\r\n  File \"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py\", line 35, in inner\r\n    response = get_response(request)\r\n  File \"/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py\", line 128, in _get_response\r\n    response = self.process_exception_by_middleware(e, request)\r\n  File \"/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py\", line 126, in _get_response\r\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py\", line 54, in wrapped_view\r\n    return view_func(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework/viewsets.py\", line 90, in view\r\n    return self.dispatch(request, *args, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework/views.py\", line 489, in dispatch\r\n    response = self.handle_exception(exc)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework/views.py\", line 449, in handle_exception\r\n    self.raise_uncaught_exception(exc)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework/views.py\", line 486, in dispatch\r\n    response = handler(request, *args, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework_extensions/cache/decorators.py\", line 48, in inner\r\n    kwargs=kwargs,\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework_extensions/cache/decorators.py\", line 63, in process_cache_response\r\n    kwargs=kwargs\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework_extensions/cache/decorators.py\", line 94, in calculate_key\r\n    kwargs=kwargs,\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework_extensions/key_constructor/constructors.py\", line 30, in __call__\r\n    return self.get_key(**kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework_extensions/key_constructor/constructors.py\", line 50, in get_key\r\n    kwargs=kwargs\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework_extensions/key_constructor/constructors.py\", line 74, in _get_key\r\n    self.get_data_from_bits(**_kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework_extensions/key_constructor/constructors.py\", line 90, in get_data_from_bits\r\n    result_dict[bit_name] = bit_instance.get_data(params=params, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/rest_framework_extensions/key_constructor/bits.py\", line 119, in get_data\r\n    if hasattr(request, 'user') and request.user and request.user.is_authenticated():\r\nTypeError: 'bool' object is not callable\r\n```\r\n\r\nAs you can see, I am using your cache solution with UserKeyBit as one of the bits.\r\n\r\nI haven't found any change relevant on the [Django 2.0 release notes](https://docs.djangoproject.com/en/2.0/releases/2.0/), so that's why I'm posting this as an issue instead of a PR with a solution. But I can volunteer to provide one if needed. Thanks for this amazing project!"},"comment":{"url":"https://api.github.com/repos/chibisov/drf-extensions/issues/comments/371510871","html_url":"https://github.com/chibisov/drf-extensions/issues/200#issuecomment-371510871","issue_url":"https://api.github.com/repos/chibisov/drf-extensions/issues/200","id":371510871,"user":{"login":"auvipy","id":6212603,"avatar_url":"https://avatars1.githubusercontent.com/u/6212603?v=4","gravatar_id":"","url":"https://api.github.com/users/auvipy","html_url":"https://github.com/auvipy","followers_url":"https://api.github.com/users/auvipy/followers","following_url":"https://api.github.com/users/auvipy/following{/other_user}","gists_url":"https://api.github.com/users/auvipy/gists{/gist_id}","starred_url":"https://api.github.com/users/auvipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auvipy/subscriptions","organizations_url":"https://api.github.com/users/auvipy/orgs","repos_url":"https://api.github.com/users/auvipy/repos","events_url":"https://api.github.com/users/auvipy/events{/privacy}","received_events_url":"https://api.github.com/users/auvipy/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T14:55:52Z","updated_at":"2018-03-08T14:55:52Z","author_association":"COLLABORATOR","body":"https://github.com/chibisov/drf-extensions/pull/209 more fixes plz review"}}
{"actor":{"display_login":"auvipy"}}