{"action":"created","issue":{"url":"https://api.github.com/repos/respondcreate/django-versatileimagefield/issues/99","repository_url":"https://api.github.com/repos/respondcreate/django-versatileimagefield","labels_url":"https://api.github.com/repos/respondcreate/django-versatileimagefield/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/respondcreate/django-versatileimagefield/issues/99/comments","events_url":"https://api.github.com/repos/respondcreate/django-versatileimagefield/issues/99/events","html_url":"https://github.com/respondcreate/django-versatileimagefield/issues/99","id":237217456,"number":99,"title":"Accessing an PPOIField field from the class raises AttributeError","user":{"login":"lufte","id":7890579,"avatar_url":"https://avatars2.githubusercontent.com/u/7890579?v=3","gravatar_id":"","url":"https://api.github.com/users/lufte","html_url":"https://github.com/lufte","followers_url":"https://api.github.com/users/lufte/followers","following_url":"https://api.github.com/users/lufte/following{/other_user}","gists_url":"https://api.github.com/users/lufte/gists{/gist_id}","starred_url":"https://api.github.com/users/lufte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lufte/subscriptions","organizations_url":"https://api.github.com/users/lufte/orgs","repos_url":"https://api.github.com/users/lufte/repos","events_url":"https://api.github.com/users/lufte/events{/privacy}","received_events_url":"https://api.github.com/users/lufte/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-20T13:54:05Z","updated_at":"2017-06-20T15:09:59Z","closed_at":"2017-06-20T14:01:10Z","body":"I'm runnning Django 1.11.0 with django-versatileimagefield 1.7.1. I have a model `BaseArticle` that looks like this:\r\n\r\n    class BaseArticle(models.Model):\r\n\r\n        image = ImageField(upload_to='articles/image', blank=True, null=True, max_length=256, ppoi_field='image_ppoi',\r\n                           variations={\r\n                               'avatar': {'width': 100, 'height': 100, 'crop': True}\r\n                           })\r\n        image_ppoi = ImagePPOIField(blank=True, null=True)\r\n\r\nSimply running `BaseArticle.image_ppoi` raises the following error:\r\n\r\n    Traceback (most recent call last):\r\n    File \"<console>\", line 1, in <module>\r\n    File \"/usr/local/lib/python3.6/site-packages/versatileimagefield/fields.py\", line 25, in __get__\r\n      return obj.__dict__[self.field.name]\r\n    AttributeError: 'NoneType' object has no attribute '__dict__'"},"comment":{"url":"https://api.github.com/repos/respondcreate/django-versatileimagefield/issues/comments/309789809","html_url":"https://github.com/respondcreate/django-versatileimagefield/issues/99#issuecomment-309789809","issue_url":"https://api.github.com/repos/respondcreate/django-versatileimagefield/issues/99","id":309789809,"user":{"login":"lufte","id":7890579,"avatar_url":"https://avatars2.githubusercontent.com/u/7890579?v=3","gravatar_id":"","url":"https://api.github.com/users/lufte","html_url":"https://github.com/lufte","followers_url":"https://api.github.com/users/lufte/followers","following_url":"https://api.github.com/users/lufte/following{/other_user}","gists_url":"https://api.github.com/users/lufte/gists{/gist_id}","starred_url":"https://api.github.com/users/lufte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lufte/subscriptions","organizations_url":"https://api.github.com/users/lufte/orgs","repos_url":"https://api.github.com/users/lufte/repos","events_url":"https://api.github.com/users/lufte/events{/privacy}","received_events_url":"https://api.github.com/users/lufte/received_events","type":"User","site_admin":false},"created_at":"2017-06-20T15:09:59Z","updated_at":"2017-06-20T15:09:59Z","body":"Hi @respondcreate, thanks for the quick feedback. I found this error not because I was doing this myself but because there is some code in Django that does this and forced us to extend the `Creator` class to patch it. I see now that they changed this behavior in Django 1.11.1, so maybe it's not a problem anymore? It will crash with previous versions though.\r\n\r\nhttps://github.com/django/django/commit/ed244199c72f5bbf33ab4547e06e69873d7271d0#diff-98e98c694c90e830f918eb5279134ab9L832"}}
{"actor":{"display_login":"lufte"}}