{"action":"created","issue":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4802","labels_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4802/labels{/name}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4802/comments","events_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4802/events","html_url":"https://github.com/DynamoDS/Dynamo/pull/4802","id":91777255,"number":4802,"title":"Fix MAGN-7770 Multiple instances of Custom Node are getting displayed because of Auto Save","user":{"login":"Randy-Ma","id":5584246,"avatar_url":"https://avatars.githubusercontent.com/u/5584246?v=3","gravatar_id":"","url":"https://api.github.com/users/Randy-Ma","html_url":"https://github.com/Randy-Ma","followers_url":"https://api.github.com/users/Randy-Ma/followers","following_url":"https://api.github.com/users/Randy-Ma/following{/other_user}","gists_url":"https://api.github.com/users/Randy-Ma/gists{/gist_id}","starred_url":"https://api.github.com/users/Randy-Ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Randy-Ma/subscriptions","organizations_url":"https://api.github.com/users/Randy-Ma/orgs","repos_url":"https://api.github.com/users/Randy-Ma/repos","events_url":"https://api.github.com/users/Randy-Ma/events{/privacy}","received_events_url":"https://api.github.com/users/Randy-Ma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DynamoDS/Dynamo/labels/LGTM","name":"LGTM","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"Randy-Ma","id":5584246,"avatar_url":"https://avatars.githubusercontent.com/u/5584246?v=3","gravatar_id":"","url":"https://api.github.com/users/Randy-Ma","html_url":"https://github.com/Randy-Ma","followers_url":"https://api.github.com/users/Randy-Ma/followers","following_url":"https://api.github.com/users/Randy-Ma/following{/other_user}","gists_url":"https://api.github.com/users/Randy-Ma/gists{/gist_id}","starred_url":"https://api.github.com/users/Randy-Ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Randy-Ma/subscriptions","organizations_url":"https://api.github.com/users/Randy-Ma/orgs","repos_url":"https://api.github.com/users/Randy-Ma/repos","events_url":"https://api.github.com/users/Randy-Ma/events{/privacy}","received_events_url":"https://api.github.com/users/Randy-Ma/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-06-29T11:20:51Z","updated_at":"2015-07-01T09:52:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4802","html_url":"https://github.com/DynamoDS/Dynamo/pull/4802","diff_url":"https://github.com/DynamoDS/Dynamo/pull/4802.diff","patch_url":"https://github.com/DynamoDS/Dynamo/pull/4802.patch"},"body":"### Purpose\r\n\r\nThis submission is to fix MAGN-7770. The reason of the defect is that every time a custom node file is saved to a different path. The file will be assigned a new GUID and a new entry will be added in the library. This is because custom node files with the same name should be differentiated by something - GUIDs in the implementation.\r\n\r\nBut if the same file is saved at path A, then path B, and then back to path A. Ideally there will only be two items in the library. But unfortunately there is no mechanism to check the first one in the library is the same with the third one.\r\n\r\nThe fix here is to check whether an entry with the same file path is already there. If so, the old ones will be removed.\r\n\r\n### Declarations\r\n\r\nCheck these if you believe they are true\r\n\r\n- [X] The code base is in a better state after this PR\r\n\r\n### Reviewers\r\n\r\n@Benglin \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/comments/117571378","html_url":"https://github.com/DynamoDS/Dynamo/pull/4802#issuecomment-117571378","issue_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4802","id":117571378,"user":{"login":"Randy-Ma","id":5584246,"avatar_url":"https://avatars.githubusercontent.com/u/5584246?v=3","gravatar_id":"","url":"https://api.github.com/users/Randy-Ma","html_url":"https://github.com/Randy-Ma","followers_url":"https://api.github.com/users/Randy-Ma/followers","following_url":"https://api.github.com/users/Randy-Ma/following{/other_user}","gists_url":"https://api.github.com/users/Randy-Ma/gists{/gist_id}","starred_url":"https://api.github.com/users/Randy-Ma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Randy-Ma/subscriptions","organizations_url":"https://api.github.com/users/Randy-Ma/orgs","repos_url":"https://api.github.com/users/Randy-Ma/repos","events_url":"https://api.github.com/users/Randy-Ma/events{/privacy}","received_events_url":"https://api.github.com/users/Randy-Ma/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T09:52:20Z","updated_at":"2015-07-01T09:52:20Z","body":"@Benglin \r\nThanks a lot! I have made a minor change to update the path before updating the custom node ID to fix several failing test cases. I am merging this so that this can be tested earlier. But please let me know if you have any comments!"}}