{"action":"created","issue":{"url":"https://api.github.com/repos/lionheart/django-pyodbc/issues/100","repository_url":"https://api.github.com/repos/lionheart/django-pyodbc","labels_url":"https://api.github.com/repos/lionheart/django-pyodbc/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/django-pyodbc/issues/100/comments","events_url":"https://api.github.com/repos/lionheart/django-pyodbc/issues/100/events","html_url":"https://github.com/lionheart/django-pyodbc/issues/100","id":109351926,"number":100,"title":"QuerySet.count() method is broken on Django 1.8","user":{"login":"dan-passaro","id":7405774,"avatar_url":"https://avatars.githubusercontent.com/u/7405774?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-passaro","html_url":"https://github.com/dan-passaro","followers_url":"https://api.github.com/users/dan-passaro/followers","following_url":"https://api.github.com/users/dan-passaro/following{/other_user}","gists_url":"https://api.github.com/users/dan-passaro/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-passaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-passaro/subscriptions","organizations_url":"https://api.github.com/users/dan-passaro/orgs","repos_url":"https://api.github.com/users/dan-passaro/repos","events_url":"https://api.github.com/users/dan-passaro/events{/privacy}","received_events_url":"https://api.github.com/users/dan-passaro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-01T18:02:50Z","updated_at":"2016-02-05T16:27:09Z","closed_at":null,"body":"I get this traceback when trying to execute a `Model.objects.count()` with django-pyodbc 0.3.0 and Django 1.8.4.\r\n\r\n    [...]/local/lib/python2.7/site-packages/django_pyodbc/compiler.pyc in _fix_aggregates(self)\r\n        116         \"\"\"\r\n        117         for alias, aggregate in self.query.aggregate_select.items():\r\n    --> 118             if aggregate.sql_function == 'AVG':# and self.connection.cast_avg_to_float:\r\n        119                 # Embed the CAST in the template on this query to\r\n        120                 # maintain multi-db support.\r\n\r\n    AttributeError: 'Count' object has no attribute 'sql_function'\r\n\r\nI do not get this same error when using Django 1.7.10."},"comment":{"url":"https://api.github.com/repos/lionheart/django-pyodbc/issues/comments/180428905","html_url":"https://github.com/lionheart/django-pyodbc/issues/100#issuecomment-180428905","issue_url":"https://api.github.com/repos/lionheart/django-pyodbc/issues/100","id":180428905,"user":{"login":"fizxmike","id":4626398,"avatar_url":"https://avatars.githubusercontent.com/u/4626398?v=3","gravatar_id":"","url":"https://api.github.com/users/fizxmike","html_url":"https://github.com/fizxmike","followers_url":"https://api.github.com/users/fizxmike/followers","following_url":"https://api.github.com/users/fizxmike/following{/other_user}","gists_url":"https://api.github.com/users/fizxmike/gists{/gist_id}","starred_url":"https://api.github.com/users/fizxmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fizxmike/subscriptions","organizations_url":"https://api.github.com/users/fizxmike/orgs","repos_url":"https://api.github.com/users/fizxmike/repos","events_url":"https://api.github.com/users/fizxmike/events{/privacy}","received_events_url":"https://api.github.com/users/fizxmike/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T16:27:09Z","updated_at":"2016-02-05T16:27:09Z","body":"Bump"}}