{"action":"created","issue":{"url":"https://api.github.com/repos/5monkeys/django-enumfield/issues/37","repository_url":"https://api.github.com/repos/5monkeys/django-enumfield","labels_url":"https://api.github.com/repos/5monkeys/django-enumfield/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/5monkeys/django-enumfield/issues/37/comments","events_url":"https://api.github.com/repos/5monkeys/django-enumfield/issues/37/events","html_url":"https://github.com/5monkeys/django-enumfield/pull/37","id":170197584,"number":37,"title":"Added tests to show errors in django 1.10","user":{"login":"jbzdak","id":112872,"avatar_url":"https://avatars.githubusercontent.com/u/112872?v=3","gravatar_id":"","url":"https://api.github.com/users/jbzdak","html_url":"https://github.com/jbzdak","followers_url":"https://api.github.com/users/jbzdak/followers","following_url":"https://api.github.com/users/jbzdak/following{/other_user}","gists_url":"https://api.github.com/users/jbzdak/gists{/gist_id}","starred_url":"https://api.github.com/users/jbzdak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbzdak/subscriptions","organizations_url":"https://api.github.com/users/jbzdak/orgs","repos_url":"https://api.github.com/users/jbzdak/repos","events_url":"https://api.github.com/users/jbzdak/events{/privacy}","received_events_url":"https://api.github.com/users/jbzdak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-09T15:32:10Z","updated_at":"2016-08-09T21:38:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/5monkeys/django-enumfield/pulls/37","html_url":"https://github.com/5monkeys/django-enumfield/pull/37","diff_url":"https://github.com/5monkeys/django-enumfield/pull/37.diff","patch_url":"https://github.com/5monkeys/django-enumfield/pull/37.patch"},"body":"Adding this PR to show bug in ``django-enumfield`` in the newly released ``Django==1.10``. \r\n\r\nProblem was (most probably) caused by this changeset in Django repository: https://github.com/django/django/commit/7f51876f99851fdc3fef63aecdfbcffa199c26b9, and especially by the change to `get_deferred_fields`.\r\n\r\nLet's consider this model: \r\n\r\n```\r\nclass Person(models.Model):\r\n    example = models.CharField(max_length=100, default=\"foo\")\r\n    status = EnumField(PersonStatus, default=PersonStatus.ALIVE)\r\n```\r\n \r\n`EnumField` users Python properties under the hood, that is: `Person.status` is a property, this causes check used by `get_deferred_fields` to always treat `status` as a deffered field (that is always `\"status\" not in self.__dict__`). This causes all kinds of fun, for example excludes status from fields that are updated. \r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/5monkeys/django-enumfield/issues/comments/238700009","html_url":"https://github.com/5monkeys/django-enumfield/pull/37#issuecomment-238700009","issue_url":"https://api.github.com/repos/5monkeys/django-enumfield/issues/37","id":238700009,"user":{"login":"listingmirror","id":19509188,"avatar_url":"https://avatars.githubusercontent.com/u/19509188?v=3","gravatar_id":"","url":"https://api.github.com/users/listingmirror","html_url":"https://github.com/listingmirror","followers_url":"https://api.github.com/users/listingmirror/followers","following_url":"https://api.github.com/users/listingmirror/following{/other_user}","gists_url":"https://api.github.com/users/listingmirror/gists{/gist_id}","starred_url":"https://api.github.com/users/listingmirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/listingmirror/subscriptions","organizations_url":"https://api.github.com/users/listingmirror/orgs","repos_url":"https://api.github.com/users/listingmirror/repos","events_url":"https://api.github.com/users/listingmirror/events{/privacy}","received_events_url":"https://api.github.com/users/listingmirror/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T21:38:11Z","updated_at":"2016-08-09T21:38:11Z","body":"Ah this is perhaps why in a brand new model with EnumFIeld... .save() blows up without a force_insert=True...."}}
{"actor":{"display_login":"listingmirror"}}