mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Merge pull request #3576 from morficus/issue-3523
Error modifying "author" attribute before post record has been created
This commit is contained in:
commit
a1dad7b59d
1 changed files with 6 additions and 0 deletions
|
@ -24,6 +24,12 @@ var PostSettingsMenuController = Ember.ObjectController.extend({
|
|||
return;
|
||||
}
|
||||
model.set('author', selectedAuthor);
|
||||
|
||||
//if this is a new post (never been saved before), don't try to save it
|
||||
if (this.get('isNew')) {
|
||||
return;
|
||||
}
|
||||
|
||||
model.save(this.get('saveOptions')).catch(function (errors) {
|
||||
self.showErrors(errors);
|
||||
self.set('selectedAuthor', author);
|
||||
|
|
Loading…
Add table
Reference in a new issue