{"action":"closed","issue":{"url":"https://api.github.com/repos/makinacorpus/django-safedelete/issues/76","repository_url":"https://api.github.com/repos/makinacorpus/django-safedelete","labels_url":"https://api.github.com/repos/makinacorpus/django-safedelete/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/makinacorpus/django-safedelete/issues/76/comments","events_url":"https://api.github.com/repos/makinacorpus/django-safedelete/issues/76/events","html_url":"https://github.com/makinacorpus/django-safedelete/issues/76","id":224229002,"number":76,"title":"QuerySet first() method gives Cannot filter a query once a slice has been taken. ","user":{"login":"glemmaPaul","id":4697524,"avatar_url":"https://avatars3.githubusercontent.com/u/4697524?v=3","gravatar_id":"","url":"https://api.github.com/users/glemmaPaul","html_url":"https://github.com/glemmaPaul","followers_url":"https://api.github.com/users/glemmaPaul/followers","following_url":"https://api.github.com/users/glemmaPaul/following{/other_user}","gists_url":"https://api.github.com/users/glemmaPaul/gists{/gist_id}","starred_url":"https://api.github.com/users/glemmaPaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glemmaPaul/subscriptions","organizations_url":"https://api.github.com/users/glemmaPaul/orgs","repos_url":"https://api.github.com/users/glemmaPaul/repos","events_url":"https://api.github.com/users/glemmaPaul/events{/privacy}","received_events_url":"https://api.github.com/users/glemmaPaul/received_events","type":"User","site_admin":false},"labels":[{"id":44088039,"url":"https://api.github.com/repos/makinacorpus/django-safedelete/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-04-25T18:20:17Z","updated_at":"2017-06-19T07:31:41Z","closed_at":"2017-06-19T07:31:41Z","body":"Hey guys!\r\n\r\nIt seems that this code change gave me an issue, as following:\r\n```\r\nUser.objects.filter(email=\"paul@email.nl\").first()\r\n```\r\nGives me:\r\n```\r\nFile \"/Users/pauloostenrijk/webprojects/app/app/users/import_export/resources.py\", line 57, in before_import\r\nuser = User.objects.all().filter(email=row['email']).first()\r\nFile \"/Users/pauloostenrijk/.virtualenvs/app/lib/python2.7/site-packages/django/db/models/query.py\", line 550, in first\r\nobjects = list((self if self.ordered else self.order_by('pk'))[:1])\r\nFile \"/Users/pauloostenrijk/.virtualenvs/app/lib/python2.7/site-packages/django/db/models/query.py\", line 258, in __iter__\r\nself._fetch_all()\r\nFile \"/Users/pauloostenrijk/.virtualenvs/app/lib/python2.7/site-packages/safedelete/queryset.py\", line 121, in decorator\r\nself._filter_visibility()\r\nFile \"/Users/pauloostenrijk/.virtualenvs/app/lib/python2.7/site-packages/safedelete/queryset.py\", line 98, in _filter_visibility\r\n\"Cannot filter a query once a slice has been taken.\"\r\nAssertionError: Cannot filter a query once a slice has been taken.\r\n```\r\n\r\nHere are some implementation details:\r\n```\r\nfrom safedelete.managers import SafeDeleteManager\r\n\r\nclass UserManager(BaseUserManager, SafeDeleteManager):\r\n```\r\n\r\n```\r\n@python_2_unicode_compatible\r\nclass User(SafeDeleteModel, AbstractBaseUser, TimeStampedUUIDModel, PermissionsMixin):\r\n    objects = UserManager()\r\n```\r\n\r\nVersion: 0.4.1\r\n"}}
{"actor":{"display_login":"Gagaro"}}