{"action":"created","issue":{"url":"https://api.github.com/repos/carljm/django-model-utils/issues/232","repository_url":"https://api.github.com/repos/carljm/django-model-utils","labels_url":"https://api.github.com/repos/carljm/django-model-utils/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/carljm/django-model-utils/issues/232/comments","events_url":"https://api.github.com/repos/carljm/django-model-utils/issues/232/events","html_url":"https://github.com/carljm/django-model-utils/issues/232","id":170809075,"number":232,"title":"FieldTracker failing with Django 1.10","user":{"login":"jarekwg","id":5036488,"avatar_url":"https://avatars.githubusercontent.com/u/5036488?v=3","gravatar_id":"","url":"https://api.github.com/users/jarekwg","html_url":"https://github.com/jarekwg","followers_url":"https://api.github.com/users/jarekwg/followers","following_url":"https://api.github.com/users/jarekwg/following{/other_user}","gists_url":"https://api.github.com/users/jarekwg/gists{/gist_id}","starred_url":"https://api.github.com/users/jarekwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarekwg/subscriptions","organizations_url":"https://api.github.com/users/jarekwg/orgs","repos_url":"https://api.github.com/users/jarekwg/repos","events_url":"https://api.github.com/users/jarekwg/events{/privacy}","received_events_url":"https://api.github.com/users/jarekwg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-12T06:46:12Z","updated_at":"2016-08-14T15:12:51Z","closed_at":null,"body":"I know you're already aware the dj110 tests don't pass, but thought I'd leave an open ticket for this, with (hopefully relevant) info I've come across.\r\n\r\nI might also have a go at tackling this over the weekend, but no promises. ;)\r\n\r\nSo my issue since upgrading to dj110 and updating to model-utils 2.5.1:\r\nCreating a model instance via a `DjangoModelFactory` (in my case using factory-boy), causes the initialised fields to come up on the `FieldTracker` as having changed in successive saves. `DjangoModelFactory()` calls the model's `.save()` method up to three times in some cases, so with this bug, a post_save handler will think the field has changed numerous times and will register fields as having changed multiple times, instead of not mentioning anything since the fields were set on init. This appears to happen both with FK fields and regular ones, so no discrimination there. factory-boy hasn't changed recently, so I suspect the problem lies with model-utils' `FieldTracker`, but I might be wrong."},"comment":{"url":"https://api.github.com/repos/carljm/django-model-utils/issues/comments/239678841","html_url":"https://github.com/carljm/django-model-utils/issues/232#issuecomment-239678841","issue_url":"https://api.github.com/repos/carljm/django-model-utils/issues/232","id":239678841,"user":{"login":"jarekwg","id":5036488,"avatar_url":"https://avatars.githubusercontent.com/u/5036488?v=3","gravatar_id":"","url":"https://api.github.com/users/jarekwg","html_url":"https://github.com/jarekwg","followers_url":"https://api.github.com/users/jarekwg/followers","following_url":"https://api.github.com/users/jarekwg/following{/other_user}","gists_url":"https://api.github.com/users/jarekwg/gists{/gist_id}","starred_url":"https://api.github.com/users/jarekwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarekwg/subscriptions","organizations_url":"https://api.github.com/users/jarekwg/orgs","repos_url":"https://api.github.com/users/jarekwg/repos","events_url":"https://api.github.com/users/jarekwg/events{/privacy}","received_events_url":"https://api.github.com/users/jarekwg/received_events","type":"User","site_admin":false},"created_at":"2016-08-14T15:12:51Z","updated_at":"2016-08-14T15:12:51Z","body":"So after a bit of digging, it seems dj110 is marking all model fields as deferred by default..\r\n\r\nie `instance._deferred_fields` seems to now contain a list of all the model fields when in the past it was just `[]`.\r\n\r\nWill keep digging."}}
{"actor":{"display_login":"jarekwg"}}