{"action":"created","issue":{"url":"https://api.github.com/repos/sehmaschine/django-grappelli/issues/646","labels_url":"https://api.github.com/repos/sehmaschine/django-grappelli/issues/646/labels{/name}","comments_url":"https://api.github.com/repos/sehmaschine/django-grappelli/issues/646/comments","events_url":"https://api.github.com/repos/sehmaschine/django-grappelli/issues/646/events","html_url":"https://github.com/sehmaschine/django-grappelli/pull/646","id":95776203,"number":646,"title":"Allow Autocomplete lookups in tables with PostgreSQL json fields","user":{"login":"strycore","id":280336,"avatar_url":"https://avatars.githubusercontent.com/u/280336?v=3","gravatar_id":"","url":"https://api.github.com/users/strycore","html_url":"https://github.com/strycore","followers_url":"https://api.github.com/users/strycore/followers","following_url":"https://api.github.com/users/strycore/following{/other_user}","gists_url":"https://api.github.com/users/strycore/gists{/gist_id}","starred_url":"https://api.github.com/users/strycore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strycore/subscriptions","organizations_url":"https://api.github.com/users/strycore/orgs","repos_url":"https://api.github.com/users/strycore/repos","events_url":"https://api.github.com/users/strycore/events{/privacy}","received_events_url":"https://api.github.com/users/strycore/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sehmaschine/django-grappelli/labels/discussion","name":"discussion","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-18T01:44:53Z","updated_at":"2015-07-23T23:57:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sehmaschine/django-grappelli/pulls/646","html_url":"https://github.com/sehmaschine/django-grappelli/pull/646","diff_url":"https://github.com/sehmaschine/django-grappelli/pull/646.diff","patch_url":"https://github.com/sehmaschine/django-grappelli/pull/646.patch"},"body":"The json type in PostgreSQL doesn't have an equality operator, thus it will fail when querying with DISTINCT on all fields. This patch overcomes this limitation by restricting the DISTINCT to fields in ORDER BY + primary key."},"comment":{"url":"https://api.github.com/repos/sehmaschine/django-grappelli/issues/comments/124272327","html_url":"https://github.com/sehmaschine/django-grappelli/pull/646#issuecomment-124272327","issue_url":"https://api.github.com/repos/sehmaschine/django-grappelli/issues/646","id":124272327,"user":{"login":"strycore","id":280336,"avatar_url":"https://avatars.githubusercontent.com/u/280336?v=3","gravatar_id":"","url":"https://api.github.com/users/strycore","html_url":"https://github.com/strycore","followers_url":"https://api.github.com/users/strycore/followers","following_url":"https://api.github.com/users/strycore/following{/other_user}","gists_url":"https://api.github.com/users/strycore/gists{/gist_id}","starred_url":"https://api.github.com/users/strycore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strycore/subscriptions","organizations_url":"https://api.github.com/users/strycore/orgs","repos_url":"https://api.github.com/users/strycore/repos","events_url":"https://api.github.com/users/strycore/events{/privacy}","received_events_url":"https://api.github.com/users/strycore/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T23:57:29Z","updated_at":"2015-07-23T23:57:29Z","body":"Yes, of course. Any model containing a JSONField (https://pypi.python.org/pypi/jsonfield) using a PostgreSQL db will trigger the issue. The specific model where I was having the problem was this one: https://github.com/lutris/website/blob/master/platforms/models.py#L7"}}