{"action":"created","comment":{"url":"https://api.github.com/repos/etianen/django-reversion/pulls/comments/189024141","pull_request_review_id":121122686,"id":189024141,"diff_hunk":"@@ -88,7 +88,10 @@ def revert(self, delete=False):\n                     )\n                     # Delete objects that are no longer in the current revision.\n                     collector = Collector(using=version_db)\n-                    collector.collect([item for item in current_revision if item not in old_revision])\n+                    new_objs = [item for item in current_revision\n+                                if item not in old_revision]\n+                    for model, group in groupby(new_objs, type):\n+                        collector.collect(list(group))","path":"reversion/models.py","position":16,"original_position":16,"commit_id":"0f7d3c6cd0824cf44b49b1513ff3ae25a0fa199c","original_commit_id":"0f7d3c6cd0824cf44b49b1513ff3ae25a0fa199c","user":{"login":"etianen","id":148744,"avatar_url":"https://avatars0.githubusercontent.com/u/148744?v=4","gravatar_id":"","url":"https://api.github.com/users/etianen","html_url":"https://github.com/etianen","followers_url":"https://api.github.com/users/etianen/followers","following_url":"https://api.github.com/users/etianen/following{/other_user}","gists_url":"https://api.github.com/users/etianen/gists{/gist_id}","starred_url":"https://api.github.com/users/etianen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etianen/subscriptions","organizations_url":"https://api.github.com/users/etianen/orgs","repos_url":"https://api.github.com/users/etianen/repos","events_url":"https://api.github.com/users/etianen/events{/privacy}","received_events_url":"https://api.github.com/users/etianen/received_events","type":"User","site_admin":false},"body":"Can you explain why this fixes the issue?","created_at":"2018-05-17T16:35:33Z","updated_at":"2018-05-17T16:35:33Z","html_url":"https://github.com/etianen/django-reversion/pull/718#discussion_r189024141","pull_request_url":"https://api.github.com/repos/etianen/django-reversion/pulls/718","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/etianen/django-reversion/pulls/comments/189024141"},"html":{"href":"https://github.com/etianen/django-reversion/pull/718#discussion_r189024141"},"pull_request":{"href":"https://api.github.com/repos/etianen/django-reversion/pulls/718"}}},"pull_request":{"url":"https://api.github.com/repos/etianen/django-reversion/pulls/718","id":184956602,"html_url":"https://github.com/etianen/django-reversion/pull/718","diff_url":"https://github.com/etianen/django-reversion/pull/718.diff","patch_url":"https://github.com/etianen/django-reversion/pull/718.patch","issue_url":"https://api.github.com/repos/etianen/django-reversion/issues/718","number":718,"state":"open","locked":false,"title":"Fix: revert delete nested inlines","user":{"login":"pkariz","id":4921363,"avatar_url":"https://avatars3.githubusercontent.com/u/4921363?v=4","gravatar_id":"","url":"https://api.github.com/users/pkariz","html_url":"https://github.com/pkariz","followers_url":"https://api.github.com/users/pkariz/followers","following_url":"https://api.github.com/users/pkariz/following{/other_user}","gists_url":"https://api.github.com/users/pkariz/gists{/gist_id}","starred_url":"https://api.github.com/users/pkariz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkariz/subscriptions","organizations_url":"https://api.github.com/users/pkariz/orgs","repos_url":"https://api.github.com/users/pkariz/repos","events_url":"https://api.github.com/users/pkariz/events{/privacy}","received_events_url":"https://api.github.com/users/pkariz/received_events","type":"User","site_admin":false},"body":"fix revert bug for nested inlines when delete=True","created_at":"2018-04-30T13:30:47Z","updated_at":"2018-05-17T16:35:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89888de968c074f484646024e40f24f0a376e24e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/etianen/django-reversion/pulls/718/commits","review_comments_url":"https://api.github.com/repos/etianen/django-reversion/pulls/718/comments","review_comment_url":"https://api.github.com/repos/etianen/django-reversion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/etianen/django-reversion/issues/718/comments","statuses_url":"https://api.github.com/repos/etianen/django-reversion/statuses/0f7d3c6cd0824cf44b49b1513ff3ae25a0fa199c","head":{"label":"pkariz:fix/revert-delete-nested-inline","ref":"fix/revert-delete-nested-inline","sha":"0f7d3c6cd0824cf44b49b1513ff3ae25a0fa199c","user":{"login":"pkariz","id":4921363,"avatar_url":"https://avatars3.githubusercontent.com/u/4921363?v=4","gravatar_id":"","url":"https://api.github.com/users/pkariz","html_url":"https://github.com/pkariz","followers_url":"https://api.github.com/users/pkariz/followers","following_url":"https://api.github.com/users/pkariz/following{/other_user}","gists_url":"https://api.github.com/users/pkariz/gists{/gist_id}","starred_url":"https://api.github.com/users/pkariz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkariz/subscriptions","organizations_url":"https://api.github.com/users/pkariz/orgs","repos_url":"https://api.github.com/users/pkariz/repos","events_url":"https://api.github.com/users/pkariz/events{/privacy}","received_events_url":"https://api.github.com/users/pkariz/received_events","type":"User","site_admin":false},"repo":{"id":131593104,"name":"django-reversion","full_name":"pkariz/django-reversion","owner":{"login":"pkariz","id":4921363,"avatar_url":"https://avatars3.githubusercontent.com/u/4921363?v=4","gravatar_id":"","url":"https://api.github.com/users/pkariz","html_url":"https://github.com/pkariz","followers_url":"https://api.github.com/users/pkariz/followers","following_url":"https://api.github.com/users/pkariz/following{/other_user}","gists_url":"https://api.github.com/users/pkariz/gists{/gist_id}","starred_url":"https://api.github.com/users/pkariz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkariz/subscriptions","organizations_url":"https://api.github.com/users/pkariz/orgs","repos_url":"https://api.github.com/users/pkariz/repos","events_url":"https://api.github.com/users/pkariz/events{/privacy}","received_events_url":"https://api.github.com/users/pkariz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pkariz/django-reversion","description":"django-reversion is an extension to the Django web framework that provides version control for model instances.","fork":true,"url":"https://api.github.com/repos/pkariz/django-reversion","forks_url":"https://api.github.com/repos/pkariz/django-reversion/forks","keys_url":"https://api.github.com/repos/pkariz/django-reversion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pkariz/django-reversion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pkariz/django-reversion/teams","hooks_url":"https://api.github.com/repos/pkariz/django-reversion/hooks","issue_events_url":"https://api.github.com/repos/pkariz/django-reversion/issues/events{/number}","events_url":"https://api.github.com/repos/pkariz/django-reversion/events","assignees_url":"https://api.github.com/repos/pkariz/django-reversion/assignees{/user}","branches_url":"https://api.github.com/repos/pkariz/django-reversion/branches{/branch}","tags_url":"https://api.github.com/repos/pkariz/django-reversion/tags","blobs_url":"https://api.github.com/repos/pkariz/django-reversion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pkariz/django-reversion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pkariz/django-reversion/git/refs{/sha}","trees_url":"https://api.github.com/repos/pkariz/django-reversion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pkariz/django-reversion/statuses/{sha}","languages_url":"https://api.github.com/repos/pkariz/django-reversion/languages","stargazers_url":"https://api.github.com/repos/pkariz/django-reversion/stargazers","contributors_url":"https://api.github.com/repos/pkariz/django-reversion/contributors","subscribers_url":"https://api.github.com/repos/pkariz/django-reversion/subscribers","subscription_url":"https://api.github.com/repos/pkariz/django-reversion/subscription","commits_url":"https://api.github.com/repos/pkariz/django-reversion/commits{/sha}","git_commits_url":"https://api.github.com/repos/pkariz/django-reversion/git/commits{/sha}","comments_url":"https://api.github.com/repos/pkariz/django-reversion/comments{/number}","issue_comment_url":"https://api.github.com/repos/pkariz/django-reversion/issues/comments{/number}","contents_url":"https://api.github.com/repos/pkariz/django-reversion/contents/{+path}","compare_url":"https://api.github.com/repos/pkariz/django-reversion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pkariz/django-reversion/merges","archive_url":"https://api.github.com/repos/pkariz/django-reversion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pkariz/django-reversion/downloads","issues_url":"https://api.github.com/repos/pkariz/django-reversion/issues{/number}","pulls_url":"https://api.github.com/repos/pkariz/django-reversion/pulls{/number}","milestones_url":"https://api.github.com/repos/pkariz/django-reversion/milestones{/number}","notifications_url":"https://api.github.com/repos/pkariz/django-reversion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pkariz/django-reversion/labels{/name}","releases_url":"https://api.github.com/repos/pkariz/django-reversion/releases{/id}","deployments_url":"https://api.github.com/repos/pkariz/django-reversion/deployments","created_at":"2018-04-30T12:27:55Z","updated_at":"2018-04-30T12:27:57Z","pushed_at":"2018-04-30T13:08:41Z","git_url":"git://github.com/pkariz/django-reversion.git","ssh_url":"git@github.com:pkariz/django-reversion.git","clone_url":"https://github.com/pkariz/django-reversion.git","svn_url":"https://github.com/pkariz/django-reversion","homepage":"https://django-reversion.readthedocs.io","size":1549,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"etianen:master","ref":"master","sha":"c768c8bd6ec86c7a4aab34a717372685dae59b85","user":{"login":"etianen","id":148744,"avatar_url":"https://avatars0.githubusercontent.com/u/148744?v=4","gravatar_id":"","url":"https://api.github.com/users/etianen","html_url":"https://github.com/etianen","followers_url":"https://api.github.com/users/etianen/followers","following_url":"https://api.github.com/users/etianen/following{/other_user}","gists_url":"https://api.github.com/users/etianen/gists{/gist_id}","starred_url":"https://api.github.com/users/etianen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etianen/subscriptions","organizations_url":"https://api.github.com/users/etianen/orgs","repos_url":"https://api.github.com/users/etianen/repos","events_url":"https://api.github.com/users/etianen/events{/privacy}","received_events_url":"https://api.github.com/users/etianen/received_events","type":"User","site_admin":false},"repo":{"id":695611,"name":"django-reversion","full_name":"etianen/django-reversion","owner":{"login":"etianen","id":148744,"avatar_url":"https://avatars0.githubusercontent.com/u/148744?v=4","gravatar_id":"","url":"https://api.github.com/users/etianen","html_url":"https://github.com/etianen","followers_url":"https://api.github.com/users/etianen/followers","following_url":"https://api.github.com/users/etianen/following{/other_user}","gists_url":"https://api.github.com/users/etianen/gists{/gist_id}","starred_url":"https://api.github.com/users/etianen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etianen/subscriptions","organizations_url":"https://api.github.com/users/etianen/orgs","repos_url":"https://api.github.com/users/etianen/repos","events_url":"https://api.github.com/users/etianen/events{/privacy}","received_events_url":"https://api.github.com/users/etianen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/etianen/django-reversion","description":"django-reversion is an extension to the Django web framework that provides version control for model instances.","fork":false,"url":"https://api.github.com/repos/etianen/django-reversion","forks_url":"https://api.github.com/repos/etianen/django-reversion/forks","keys_url":"https://api.github.com/repos/etianen/django-reversion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/etianen/django-reversion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/etianen/django-reversion/teams","hooks_url":"https://api.github.com/repos/etianen/django-reversion/hooks","issue_events_url":"https://api.github.com/repos/etianen/django-reversion/issues/events{/number}","events_url":"https://api.github.com/repos/etianen/django-reversion/events","assignees_url":"https://api.github.com/repos/etianen/django-reversion/assignees{/user}","branches_url":"https://api.github.com/repos/etianen/django-reversion/branches{/branch}","tags_url":"https://api.github.com/repos/etianen/django-reversion/tags","blobs_url":"https://api.github.com/repos/etianen/django-reversion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/etianen/django-reversion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/etianen/django-reversion/git/refs{/sha}","trees_url":"https://api.github.com/repos/etianen/django-reversion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/etianen/django-reversion/statuses/{sha}","languages_url":"https://api.github.com/repos/etianen/django-reversion/languages","stargazers_url":"https://api.github.com/repos/etianen/django-reversion/stargazers","contributors_url":"https://api.github.com/repos/etianen/django-reversion/contributors","subscribers_url":"https://api.github.com/repos/etianen/django-reversion/subscribers","subscription_url":"https://api.github.com/repos/etianen/django-reversion/subscription","commits_url":"https://api.github.com/repos/etianen/django-reversion/commits{/sha}","git_commits_url":"https://api.github.com/repos/etianen/django-reversion/git/commits{/sha}","comments_url":"https://api.github.com/repos/etianen/django-reversion/comments{/number}","issue_comment_url":"https://api.github.com/repos/etianen/django-reversion/issues/comments{/number}","contents_url":"https://api.github.com/repos/etianen/django-reversion/contents/{+path}","compare_url":"https://api.github.com/repos/etianen/django-reversion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/etianen/django-reversion/merges","archive_url":"https://api.github.com/repos/etianen/django-reversion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/etianen/django-reversion/downloads","issues_url":"https://api.github.com/repos/etianen/django-reversion/issues{/number}","pulls_url":"https://api.github.com/repos/etianen/django-reversion/pulls{/number}","milestones_url":"https://api.github.com/repos/etianen/django-reversion/milestones{/number}","notifications_url":"https://api.github.com/repos/etianen/django-reversion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/etianen/django-reversion/labels{/name}","releases_url":"https://api.github.com/repos/etianen/django-reversion/releases{/id}","deployments_url":"https://api.github.com/repos/etianen/django-reversion/deployments","created_at":"2010-05-31T15:32:25Z","updated_at":"2018-05-16T18:40:12Z","pushed_at":"2018-04-30T13:30:48Z","git_url":"git://github.com/etianen/django-reversion.git","ssh_url":"git@github.com:etianen/django-reversion.git","clone_url":"https://github.com/etianen/django-reversion.git","svn_url":"https://github.com/etianen/django-reversion","homepage":"https://django-reversion.readthedocs.io","size":1546,"stargazers_count":2019,"watchers_count":2019,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":383,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":383,"open_issues":28,"watchers":2019,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/etianen/django-reversion/pulls/718"},"html":{"href":"https://github.com/etianen/django-reversion/pull/718"},"issue":{"href":"https://api.github.com/repos/etianen/django-reversion/issues/718"},"comments":{"href":"https://api.github.com/repos/etianen/django-reversion/issues/718/comments"},"review_comments":{"href":"https://api.github.com/repos/etianen/django-reversion/pulls/718/comments"},"review_comment":{"href":"https://api.github.com/repos/etianen/django-reversion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/etianen/django-reversion/pulls/718/commits"},"statuses":{"href":"https://api.github.com/repos/etianen/django-reversion/statuses/0f7d3c6cd0824cf44b49b1513ff3ae25a0fa199c"}},"author_association":"NONE"}}
{"actor":{"display_login":"etianen"}}