{"action":"created","issue":{"url":"https://api.github.com/repos/iambrandontaylor/django-admin-sortable/issues/108","labels_url":"https://api.github.com/repos/iambrandontaylor/django-admin-sortable/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/iambrandontaylor/django-admin-sortable/issues/108/comments","events_url":"https://api.github.com/repos/iambrandontaylor/django-admin-sortable/issues/108/events","html_url":"https://github.com/iambrandontaylor/django-admin-sortable/issues/108","id":91954555,"number":108,"title":"Bug in get_previous() method","user":{"login":"dvkovner","id":13110972,"avatar_url":"https://avatars.githubusercontent.com/u/13110972?v=3","gravatar_id":"","url":"https://api.github.com/users/dvkovner","html_url":"https://github.com/dvkovner","followers_url":"https://api.github.com/users/dvkovner/followers","following_url":"https://api.github.com/users/dvkovner/following{/other_user}","gists_url":"https://api.github.com/users/dvkovner/gists{/gist_id}","starred_url":"https://api.github.com/users/dvkovner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvkovner/subscriptions","organizations_url":"https://api.github.com/users/dvkovner/orgs","repos_url":"https://api.github.com/users/dvkovner/repos","events_url":"https://api.github.com/users/dvkovner/events{/privacy}","received_events_url":"https://api.github.com/users/dvkovner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-30T01:49:47Z","updated_at":"2015-06-30T12:07:42Z","closed_at":null,"body":"Hello! Method get_previous() in Sortable class always return first value of queryset. I think that is related with this part of  _filter_objects() method in Sortable class:\r\n\r\n        try:\r\n            obj = self.__class__.objects.filter(**filters)[:1][0]\r\n        except IndexError:\r\n            obj = None\r\n\r\nP.S. Sorry for my English :)"},"comment":{"url":"https://api.github.com/repos/iambrandontaylor/django-admin-sortable/issues/comments/117153438","html_url":"https://github.com/iambrandontaylor/django-admin-sortable/issues/108#issuecomment-117153438","issue_url":"https://api.github.com/repos/iambrandontaylor/django-admin-sortable/issues/108","id":117153438,"user":{"login":"alsoicode","id":86738,"avatar_url":"https://avatars.githubusercontent.com/u/86738?v=3","gravatar_id":"","url":"https://api.github.com/users/alsoicode","html_url":"https://github.com/alsoicode","followers_url":"https://api.github.com/users/alsoicode/followers","following_url":"https://api.github.com/users/alsoicode/following{/other_user}","gists_url":"https://api.github.com/users/alsoicode/gists{/gist_id}","starred_url":"https://api.github.com/users/alsoicode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alsoicode/subscriptions","organizations_url":"https://api.github.com/users/alsoicode/orgs","repos_url":"https://api.github.com/users/alsoicode/repos","events_url":"https://api.github.com/users/alsoicode/events{/privacy}","received_events_url":"https://api.github.com/users/alsoicode/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T12:07:42Z","updated_at":"2015-06-30T12:07:42Z","body":"Can you give me a sample of the data? Keep in mind that if you have a SortableForeignKey field, the next/previous record will be returned relative to the SortableForeignKey. See: https://github.com/iambrandontaylor/django-admin-sortable#model-instance-methods for an explanation of which records will be returned for a sample data set."}}