{"action":"created","issue":{"url":"https://api.github.com/repos/StanfordBioinformatics/xppf/issues/2","labels_url":"https://api.github.com/repos/StanfordBioinformatics/xppf/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/StanfordBioinformatics/xppf/issues/2/comments","events_url":"https://api.github.com/repos/StanfordBioinformatics/xppf/issues/2/events","html_url":"https://github.com/StanfordBioinformatics/xppf/issues/2","id":88614356,"number":2,"title":"null string fields not handled properly by immutable models","user":{"login":"nhammond","id":1828858,"avatar_url":"https://avatars.githubusercontent.com/u/1828858?v=3","gravatar_id":"","url":"https://api.github.com/users/nhammond","html_url":"https://github.com/nhammond","followers_url":"https://api.github.com/users/nhammond/followers","following_url":"https://api.github.com/users/nhammond/following{/other_user}","gists_url":"https://api.github.com/users/nhammond/gists{/gist_id}","starred_url":"https://api.github.com/users/nhammond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhammond/subscriptions","organizations_url":"https://api.github.com/users/nhammond/orgs","repos_url":"https://api.github.com/users/nhammond/repos","events_url":"https://api.github.com/users/nhammond/events{/privacy}","received_events_url":"https://api.github.com/users/nhammond/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-16T04:37:27Z","updated_at":"2015-07-10T18:26:43Z","closed_at":"2015-07-10T18:26:43Z","body":"In a model with a required models.CharFIeld, omitting that field from the JSON used to initialize the model does not cause an error. Later calling to_obj on that model raises an error.\r\n\r\nReproduction steps:\r\nEdit analyses.test_models, delete the ‘requester’ field in file_import_request_obj\r\nThen run test_models.TestModels.testFileImportRecord\r\n\r\n*** UniqueIdMismatchError: The _id 3a713b852394f366ad67a9691203126516a824e7d1018cce1c3f5c1b4a6457d6 is out of sync with the hash of contents {'requester': u'', '_id': '3a713b852394f366ad67a9691203126516a824e7d1018cce1c3f5c1b4a6457d6', 'file': {'_id': 'baafd857fda46c21f61a5d8e99e02b55b61f4fb26f6fd4a435f242107d65e835', 'hash_value': u'1234asfd', 'hash_function': u'md5'}, 'import_comments': u'Notes about the source of this file...'} on model <class 'analyses.models.FileImportRecord'>\r\n(Pdb) file_import_record.to_json()\r\n"},"comment":{"url":"https://api.github.com/repos/StanfordBioinformatics/xppf/issues/comments/120487551","html_url":"https://github.com/StanfordBioinformatics/xppf/issues/2#issuecomment-120487551","issue_url":"https://api.github.com/repos/StanfordBioinformatics/xppf/issues/2","id":120487551,"user":{"login":"nhammond","id":1828858,"avatar_url":"https://avatars.githubusercontent.com/u/1828858?v=3","gravatar_id":"","url":"https://api.github.com/users/nhammond","html_url":"https://github.com/nhammond","followers_url":"https://api.github.com/users/nhammond/followers","following_url":"https://api.github.com/users/nhammond/following{/other_user}","gists_url":"https://api.github.com/users/nhammond/gists{/gist_id}","starred_url":"https://api.github.com/users/nhammond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhammond/subscriptions","organizations_url":"https://api.github.com/users/nhammond/orgs","repos_url":"https://api.github.com/users/nhammond/repos","events_url":"https://api.github.com/users/nhammond/events{/privacy}","received_events_url":"https://api.github.com/users/nhammond/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T18:26:43Z","updated_at":"2015-07-10T18:26:43Z","body":"Resolved. master.immutable.helpers.IdCalculator now always excludes Null and [] values."}}