{"comment":{"url":"https://api.github.com/repos/medic/medic-webapp/comments/17706525","html_url":"https://github.com/medic/medic-webapp/commit/ca1737ed1aa8e7c0f2e5185e886a06e0a1ff4fe1#commitcomment-17706525","id":17706525,"user":{"login":"garethbowen","id":2064938,"avatar_url":"https://avatars.githubusercontent.com/u/2064938?v=3","gravatar_id":"","url":"https://api.github.com/users/garethbowen","html_url":"https://github.com/garethbowen","followers_url":"https://api.github.com/users/garethbowen/followers","following_url":"https://api.github.com/users/garethbowen/following{/other_user}","gists_url":"https://api.github.com/users/garethbowen/gists{/gist_id}","starred_url":"https://api.github.com/users/garethbowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethbowen/subscriptions","organizations_url":"https://api.github.com/users/garethbowen/orgs","repos_url":"https://api.github.com/users/garethbowen/repos","events_url":"https://api.github.com/users/garethbowen/events{/privacy}","received_events_url":"https://api.github.com/users/garethbowen/received_events","type":"User","site_admin":false},"position":70,"line":74,"path":"static/js/services/delete-doc.js","commit_id":"ca1737ed1aa8e7c0f2e5185e886a06e0a1ff4fe1","created_at":"2016-06-01T23:21:27Z","updated_at":"2016-06-01T23:21:27Z","body":"I've moved the check down to below where the parents are fetched. I should have made myself more clear, but the idea was if you're deleting a person and the person's parent then it's guaranteed to document update conflict because we'll try to update the parent to have `contact=null` then we'll try to update the parent to have `_deleted:true`. Moving the check down to here means we catch this before we attempt to save, which makes the request atomic, ie: nothing is saved."}}
{"actor":{"display_login":"garethbowen"}}