{"action":"created","comment":{"url":"https://api.github.com/repos/sdelements/django-multi-import/pulls/comments/46247611","id":46247611,"diff_hunk":"@@ -25,27 +28,36 @@ def get_object_changes(self, attributes, obj, update=False):\n             if not value:\n                 continue\n \n-            mapping = self.mappings.fields[attribute]\n+            field = self.serializer.fields.get(column_name, None)\n+\n+            if not field:\n+                continue\n \n-            if mapping.readonly:\n+            if field.read_only:","path":"multi_import/import_diff_applier.py","position":37,"original_position":37,"commit_id":"98b672282cee1b3b8e50d442512a1117dd6e8155","original_commit_id":"98b672282cee1b3b8e50d442512a1117dd6e8155","user":{"login":"hanifvirani","id":566000,"avatar_url":"https://avatars.githubusercontent.com/u/566000?v=3","gravatar_id":"","url":"https://api.github.com/users/hanifvirani","html_url":"https://github.com/hanifvirani","followers_url":"https://api.github.com/users/hanifvirani/followers","following_url":"https://api.github.com/users/hanifvirani/following{/other_user}","gists_url":"https://api.github.com/users/hanifvirani/gists{/gist_id}","starred_url":"https://api.github.com/users/hanifvirani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanifvirani/subscriptions","organizations_url":"https://api.github.com/users/hanifvirani/orgs","repos_url":"https://api.github.com/users/hanifvirani/repos","events_url":"https://api.github.com/users/hanifvirani/events{/privacy}","received_events_url":"https://api.github.com/users/hanifvirani/received_events","type":"User","site_admin":false},"body":"You could combine this and the above if statements.","created_at":"2015-12-01T07:39:53Z","updated_at":"2015-12-01T07:39:53Z","html_url":"https://github.com/sdelements/django-multi-import/pull/2#discussion_r46247611","pull_request_url":"https://api.github.com/repos/sdelements/django-multi-import/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/sdelements/django-multi-import/pulls/comments/46247611"},"html":{"href":"https://github.com/sdelements/django-multi-import/pull/2#discussion_r46247611"},"pull_request":{"href":"https://api.github.com/repos/sdelements/django-multi-import/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/sdelements/django-multi-import/pulls/2","id":52011889,"html_url":"https://github.com/sdelements/django-multi-import/pull/2","diff_url":"https://github.com/sdelements/django-multi-import/pull/2.diff","patch_url":"https://github.com/sdelements/django-multi-import/pull/2.patch","issue_url":"https://api.github.com/repos/sdelements/django-multi-import/issues/2","number":2,"state":"open","locked":false,"title":"Replace mappings/resolvers with DRF serializers","user":{"login":"sibartlett","id":216687,"avatar_url":"https://avatars.githubusercontent.com/u/216687?v=3","gravatar_id":"","url":"https://api.github.com/users/sibartlett","html_url":"https://github.com/sibartlett","followers_url":"https://api.github.com/users/sibartlett/followers","following_url":"https://api.github.com/users/sibartlett/following{/other_user}","gists_url":"https://api.github.com/users/sibartlett/gists{/gist_id}","starred_url":"https://api.github.com/users/sibartlett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sibartlett/subscriptions","organizations_url":"https://api.github.com/users/sibartlett/orgs","repos_url":"https://api.github.com/users/sibartlett/repos","events_url":"https://api.github.com/users/sibartlett/events{/privacy}","received_events_url":"https://api.github.com/users/sibartlett/received_events","type":"User","site_admin":false},"body":"Use Django Rest Framework Serializers.\r\n\r\nBecause:\r\n\r\n* We can rely on their test coverage\r\n* Our team already has lots of DRF knowledge\r\n* Fields are a better abstraction than Mapping/ValueResolver to handle field/type logic\r\n* Hanif said so","created_at":"2015-11-27T16:44:55Z","updated_at":"2015-12-01T07:39:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e6c7e733ea393c2d7b134ce53b0df78bf8e0381","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sdelements/django-multi-import/pulls/2/commits","review_comments_url":"https://api.github.com/repos/sdelements/django-multi-import/pulls/2/comments","review_comment_url":"https://api.github.com/repos/sdelements/django-multi-import/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sdelements/django-multi-import/issues/2/comments","statuses_url":"https://api.github.com/repos/sdelements/django-multi-import/statuses/98b672282cee1b3b8e50d442512a1117dd6e8155","head":{"label":"sdelements:drf","ref":"drf","sha":"98b672282cee1b3b8e50d442512a1117dd6e8155","user":{"login":"sdelements","id":739346,"avatar_url":"https://avatars.githubusercontent.com/u/739346?v=3","gravatar_id":"","url":"https://api.github.com/users/sdelements","html_url":"https://github.com/sdelements","followers_url":"https://api.github.com/users/sdelements/followers","following_url":"https://api.github.com/users/sdelements/following{/other_user}","gists_url":"https://api.github.com/users/sdelements/gists{/gist_id}","starred_url":"https://api.github.com/users/sdelements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdelements/subscriptions","organizations_url":"https://api.github.com/users/sdelements/orgs","repos_url":"https://api.github.com/users/sdelements/repos","events_url":"https://api.github.com/users/sdelements/events{/privacy}","received_events_url":"https://api.github.com/users/sdelements/received_events","type":"Organization","site_admin":false},"repo":{"id":45694868,"name":"django-multi-import","full_name":"sdelements/django-multi-import","owner":{"login":"sdelements","id":739346,"avatar_url":"https://avatars.githubusercontent.com/u/739346?v=3","gravatar_id":"","url":"https://api.github.com/users/sdelements","html_url":"https://github.com/sdelements","followers_url":"https://api.github.com/users/sdelements/followers","following_url":"https://api.github.com/users/sdelements/following{/other_user}","gists_url":"https://api.github.com/users/sdelements/gists{/gist_id}","starred_url":"https://api.github.com/users/sdelements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdelements/subscriptions","organizations_url":"https://api.github.com/users/sdelements/orgs","repos_url":"https://api.github.com/users/sdelements/repos","events_url":"https://api.github.com/users/sdelements/events{/privacy}","received_events_url":"https://api.github.com/users/sdelements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sdelements/django-multi-import","description":"","fork":false,"url":"https://api.github.com/repos/sdelements/django-multi-import","forks_url":"https://api.github.com/repos/sdelements/django-multi-import/forks","keys_url":"https://api.github.com/repos/sdelements/django-multi-import/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sdelements/django-multi-import/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sdelements/django-multi-import/teams","hooks_url":"https://api.github.com/repos/sdelements/django-multi-import/hooks","issue_events_url":"https://api.github.com/repos/sdelements/django-multi-import/issues/events{/number}","events_url":"https://api.github.com/repos/sdelements/django-multi-import/events","assignees_url":"https://api.github.com/repos/sdelements/django-multi-import/assignees{/user}","branches_url":"https://api.github.com/repos/sdelements/django-multi-import/branches{/branch}","tags_url":"https://api.github.com/repos/sdelements/django-multi-import/tags","blobs_url":"https://api.github.com/repos/sdelements/django-multi-import/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sdelements/django-multi-import/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sdelements/django-multi-import/git/refs{/sha}","trees_url":"https://api.github.com/repos/sdelements/django-multi-import/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sdelements/django-multi-import/statuses/{sha}","languages_url":"https://api.github.com/repos/sdelements/django-multi-import/languages","stargazers_url":"https://api.github.com/repos/sdelements/django-multi-import/stargazers","contributors_url":"https://api.github.com/repos/sdelements/django-multi-import/contributors","subscribers_url":"https://api.github.com/repos/sdelements/django-multi-import/subscribers","subscription_url":"https://api.github.com/repos/sdelements/django-multi-import/subscription","commits_url":"https://api.github.com/repos/sdelements/django-multi-import/commits{/sha}","git_commits_url":"https://api.github.com/repos/sdelements/django-multi-import/git/commits{/sha}","comments_url":"https://api.github.com/repos/sdelements/django-multi-import/comments{/number}","issue_comment_url":"https://api.github.com/repos/sdelements/django-multi-import/issues/comments{/number}","contents_url":"https://api.github.com/repos/sdelements/django-multi-import/contents/{+path}","compare_url":"https://api.github.com/repos/sdelements/django-multi-import/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sdelements/django-multi-import/merges","archive_url":"https://api.github.com/repos/sdelements/django-multi-import/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sdelements/django-multi-import/downloads","issues_url":"https://api.github.com/repos/sdelements/django-multi-import/issues{/number}","pulls_url":"https://api.github.com/repos/sdelements/django-multi-import/pulls{/number}","milestones_url":"https://api.github.com/repos/sdelements/django-multi-import/milestones{/number}","notifications_url":"https://api.github.com/repos/sdelements/django-multi-import/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sdelements/django-multi-import/labels{/name}","releases_url":"https://api.github.com/repos/sdelements/django-multi-import/releases{/id}","created_at":"2015-11-06T16:56:50Z","updated_at":"2015-11-06T19:28:08Z","pushed_at":"2015-11-30T18:32:35Z","git_url":"git://github.com/sdelements/django-multi-import.git","ssh_url":"git@github.com:sdelements/django-multi-import.git","clone_url":"https://github.com/sdelements/django-multi-import.git","svn_url":"https://github.com/sdelements/django-multi-import","homepage":null,"size":58,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"sdelements:master","ref":"master","sha":"d2463daf5c9511bd24e840e25fe2962ff646b41f","user":{"login":"sdelements","id":739346,"avatar_url":"https://avatars.githubusercontent.com/u/739346?v=3","gravatar_id":"","url":"https://api.github.com/users/sdelements","html_url":"https://github.com/sdelements","followers_url":"https://api.github.com/users/sdelements/followers","following_url":"https://api.github.com/users/sdelements/following{/other_user}","gists_url":"https://api.github.com/users/sdelements/gists{/gist_id}","starred_url":"https://api.github.com/users/sdelements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdelements/subscriptions","organizations_url":"https://api.github.com/users/sdelements/orgs","repos_url":"https://api.github.com/users/sdelements/repos","events_url":"https://api.github.com/users/sdelements/events{/privacy}","received_events_url":"https://api.github.com/users/sdelements/received_events","type":"Organization","site_admin":false},"repo":{"id":45694868,"name":"django-multi-import","full_name":"sdelements/django-multi-import","owner":{"login":"sdelements","id":739346,"avatar_url":"https://avatars.githubusercontent.com/u/739346?v=3","gravatar_id":"","url":"https://api.github.com/users/sdelements","html_url":"https://github.com/sdelements","followers_url":"https://api.github.com/users/sdelements/followers","following_url":"https://api.github.com/users/sdelements/following{/other_user}","gists_url":"https://api.github.com/users/sdelements/gists{/gist_id}","starred_url":"https://api.github.com/users/sdelements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdelements/subscriptions","organizations_url":"https://api.github.com/users/sdelements/orgs","repos_url":"https://api.github.com/users/sdelements/repos","events_url":"https://api.github.com/users/sdelements/events{/privacy}","received_events_url":"https://api.github.com/users/sdelements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sdelements/django-multi-import","description":"","fork":false,"url":"https://api.github.com/repos/sdelements/django-multi-import","forks_url":"https://api.github.com/repos/sdelements/django-multi-import/forks","keys_url":"https://api.github.com/repos/sdelements/django-multi-import/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sdelements/django-multi-import/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sdelements/django-multi-import/teams","hooks_url":"https://api.github.com/repos/sdelements/django-multi-import/hooks","issue_events_url":"https://api.github.com/repos/sdelements/django-multi-import/issues/events{/number}","events_url":"https://api.github.com/repos/sdelements/django-multi-import/events","assignees_url":"https://api.github.com/repos/sdelements/django-multi-import/assignees{/user}","branches_url":"https://api.github.com/repos/sdelements/django-multi-import/branches{/branch}","tags_url":"https://api.github.com/repos/sdelements/django-multi-import/tags","blobs_url":"https://api.github.com/repos/sdelements/django-multi-import/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sdelements/django-multi-import/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sdelements/django-multi-import/git/refs{/sha}","trees_url":"https://api.github.com/repos/sdelements/django-multi-import/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sdelements/django-multi-import/statuses/{sha}","languages_url":"https://api.github.com/repos/sdelements/django-multi-import/languages","stargazers_url":"https://api.github.com/repos/sdelements/django-multi-import/stargazers","contributors_url":"https://api.github.com/repos/sdelements/django-multi-import/contributors","subscribers_url":"https://api.github.com/repos/sdelements/django-multi-import/subscribers","subscription_url":"https://api.github.com/repos/sdelements/django-multi-import/subscription","commits_url":"https://api.github.com/repos/sdelements/django-multi-import/commits{/sha}","git_commits_url":"https://api.github.com/repos/sdelements/django-multi-import/git/commits{/sha}","comments_url":"https://api.github.com/repos/sdelements/django-multi-import/comments{/number}","issue_comment_url":"https://api.github.com/repos/sdelements/django-multi-import/issues/comments{/number}","contents_url":"https://api.github.com/repos/sdelements/django-multi-import/contents/{+path}","compare_url":"https://api.github.com/repos/sdelements/django-multi-import/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sdelements/django-multi-import/merges","archive_url":"https://api.github.com/repos/sdelements/django-multi-import/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sdelements/django-multi-import/downloads","issues_url":"https://api.github.com/repos/sdelements/django-multi-import/issues{/number}","pulls_url":"https://api.github.com/repos/sdelements/django-multi-import/pulls{/number}","milestones_url":"https://api.github.com/repos/sdelements/django-multi-import/milestones{/number}","notifications_url":"https://api.github.com/repos/sdelements/django-multi-import/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sdelements/django-multi-import/labels{/name}","releases_url":"https://api.github.com/repos/sdelements/django-multi-import/releases{/id}","created_at":"2015-11-06T16:56:50Z","updated_at":"2015-11-06T19:28:08Z","pushed_at":"2015-11-30T18:32:35Z","git_url":"git://github.com/sdelements/django-multi-import.git","ssh_url":"git@github.com:sdelements/django-multi-import.git","clone_url":"https://github.com/sdelements/django-multi-import.git","svn_url":"https://github.com/sdelements/django-multi-import","homepage":null,"size":58,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sdelements/django-multi-import/pulls/2"},"html":{"href":"https://github.com/sdelements/django-multi-import/pull/2"},"issue":{"href":"https://api.github.com/repos/sdelements/django-multi-import/issues/2"},"comments":{"href":"https://api.github.com/repos/sdelements/django-multi-import/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/sdelements/django-multi-import/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/sdelements/django-multi-import/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sdelements/django-multi-import/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/sdelements/django-multi-import/statuses/98b672282cee1b3b8e50d442512a1117dd6e8155"}}}}