{"action":"created","issue":{"url":"https://api.github.com/repos/wagtail/django-modelcluster/issues/95","repository_url":"https://api.github.com/repos/wagtail/django-modelcluster","labels_url":"https://api.github.com/repos/wagtail/django-modelcluster/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/wagtail/django-modelcluster/issues/95/comments","events_url":"https://api.github.com/repos/wagtail/django-modelcluster/issues/95/events","html_url":"https://github.com/wagtail/django-modelcluster/pull/95","id":315912835,"number":95,"title":"Exclude remote fields with serialize=False from serialization","user":{"login":"skirsdeda","id":7189652,"avatar_url":"https://avatars0.githubusercontent.com/u/7189652?v=4","gravatar_id":"","url":"https://api.github.com/users/skirsdeda","html_url":"https://github.com/skirsdeda","followers_url":"https://api.github.com/users/skirsdeda/followers","following_url":"https://api.github.com/users/skirsdeda/following{/other_user}","gists_url":"https://api.github.com/users/skirsdeda/gists{/gist_id}","starred_url":"https://api.github.com/users/skirsdeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skirsdeda/subscriptions","organizations_url":"https://api.github.com/users/skirsdeda/orgs","repos_url":"https://api.github.com/users/skirsdeda/repos","events_url":"https://api.github.com/users/skirsdeda/events{/privacy}","received_events_url":"https://api.github.com/users/skirsdeda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-19T14:51:26Z","updated_at":"2018-04-19T14:54:23Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/wagtail/django-modelcluster/pulls/95","html_url":"https://github.com/wagtail/django-modelcluster/pull/95","diff_url":"https://github.com/wagtail/django-modelcluster/pull/95.diff","patch_url":"https://github.com/wagtail/django-modelcluster/pull/95.patch"},"body":"So I got burnt by wagtail page revisions :) I have related data via ParentalKey to one of my Page models but it's managed separately from pages. Since modelcluster includes all relations defined with ParentalKey when serializing by default, I have out-of-date data in such page revisions. And whenever I publish such Page, revision gets restored and happily overwrites these relations.\r\n\r\nSo I think the best solution to this problem is to filter out relations where ParentalKey has serialize=False (just like regular fields). This would also fix Page.copy because it calls ```get_all_child_relations``` from modelcluster."},"comment":{"url":"https://api.github.com/repos/wagtail/django-modelcluster/issues/comments/382766870","html_url":"https://github.com/wagtail/django-modelcluster/pull/95#issuecomment-382766870","issue_url":"https://api.github.com/repos/wagtail/django-modelcluster/issues/95","id":382766870,"user":{"login":"gasman","id":85097,"avatar_url":"https://avatars2.githubusercontent.com/u/85097?v=4","gravatar_id":"","url":"https://api.github.com/users/gasman","html_url":"https://github.com/gasman","followers_url":"https://api.github.com/users/gasman/followers","following_url":"https://api.github.com/users/gasman/following{/other_user}","gists_url":"https://api.github.com/users/gasman/gists{/gist_id}","starred_url":"https://api.github.com/users/gasman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasman/subscriptions","organizations_url":"https://api.github.com/users/gasman/orgs","repos_url":"https://api.github.com/users/gasman/repos","events_url":"https://api.github.com/users/gasman/events{/privacy}","received_events_url":"https://api.github.com/users/gasman/received_events","type":"User","site_admin":false},"created_at":"2018-04-19T14:54:23Z","updated_at":"2018-04-19T14:54:23Z","author_association":"CONTRIBUTOR","body":"Thanks @skirsdeda! Can you add tests for this, please?"}}
{"actor":{"display_login":"gasman"}}