{"action":"created","issue":{"url":"https://api.github.com/repos/jedireza/drywall/issues/318","labels_url":"https://api.github.com/repos/jedireza/drywall/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/jedireza/drywall/issues/318/comments","events_url":"https://api.github.com/repos/jedireza/drywall/issues/318/events","html_url":"https://github.com/jedireza/drywall/issues/318","id":107704833,"number":318,"title":"Updates in admin","user":{"login":"LoicDagnas","id":7431237,"avatar_url":"https://avatars.githubusercontent.com/u/7431237?v=3","gravatar_id":"","url":"https://api.github.com/users/LoicDagnas","html_url":"https://github.com/LoicDagnas","followers_url":"https://api.github.com/users/LoicDagnas/followers","following_url":"https://api.github.com/users/LoicDagnas/following{/other_user}","gists_url":"https://api.github.com/users/LoicDagnas/gists{/gist_id}","starred_url":"https://api.github.com/users/LoicDagnas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoicDagnas/subscriptions","organizations_url":"https://api.github.com/users/LoicDagnas/orgs","repos_url":"https://api.github.com/users/LoicDagnas/repos","events_url":"https://api.github.com/users/LoicDagnas/events{/privacy}","received_events_url":"https://api.github.com/users/LoicDagnas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jedireza/drywall/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-22T12:31:36Z","updated_at":"2015-10-06T03:59:59Z","closed_at":null,"body":"Hi,\r\nfirst of all, I have used Drywall for three months and it is a very very great framework, thanks a lot!\r\n\r\nHowever, I may have found a problem in the administration pages. For example if I want to update an account phone number:\r\n* I modify the field phone number from `phone1` to `phone2`\r\n* I click `update`\r\n* I modify again the phone number from `phone2` to `phone3`\r\n* I click `update` again and then `phone2` is displayed in the phone number  field instead of `phone3`\r\n\r\nOf course it is just an example, the same strange thing could be seen for the other fields and the other models (user, admin-group...).\r\n\r\nIn my opinion, it is tied to the use of ` this.listenTo(app.mainView.model, 'change', this.syncUp);` in the Backbone model, I don't use this listener any more and it seems to work fine. \r\n\r\nBest\r\n\r\nLoïc "},"comment":{"url":"https://api.github.com/repos/jedireza/drywall/issues/comments/145735865","html_url":"https://github.com/jedireza/drywall/issues/318#issuecomment-145735865","issue_url":"https://api.github.com/repos/jedireza/drywall/issues/318","id":145735865,"user":{"login":"jedireza","id":979929,"avatar_url":"https://avatars.githubusercontent.com/u/979929?v=3","gravatar_id":"","url":"https://api.github.com/users/jedireza","html_url":"https://github.com/jedireza","followers_url":"https://api.github.com/users/jedireza/followers","following_url":"https://api.github.com/users/jedireza/following{/other_user}","gists_url":"https://api.github.com/users/jedireza/gists{/gist_id}","starred_url":"https://api.github.com/users/jedireza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedireza/subscriptions","organizations_url":"https://api.github.com/users/jedireza/orgs","repos_url":"https://api.github.com/users/jedireza/repos","events_url":"https://api.github.com/users/jedireza/events{/privacy}","received_events_url":"https://api.github.com/users/jedireza/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T03:59:59Z","updated_at":"2015-10-06T03:59:59Z","body":"I think I know why this is happening. Mongoose is returning the original document. In another project, I had to go through all my `findByIdAndUpdate` commands and add an `options` argument if one didn't exist or modify the current one to include `{ new: true }`, which will cause MongoDB to return the updated document instead.\r\n\r\nSee: http://mongoosejs.com/docs/api.html#model_Model.findByIdAndUpdate"}}