corrected newPoll to this since this is an already existing object.
This commit is contained in:
parent
8a12560849
commit
83b010100f
1 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ function evalPoll(param, creator) {
|
||||||
if (!title)
|
if (!title)
|
||||||
continue;
|
continue;
|
||||||
var newChoice = new choice();
|
var newChoice = new choice();
|
||||||
newChoice.poll = newPoll;
|
newChoice.poll = this;
|
||||||
newChoice.title = title;
|
newChoice.title = title;
|
||||||
newChoice.createtime = new Date();
|
newChoice.createtime = new Date();
|
||||||
newChoice.modifytime = new Date();
|
newChoice.modifytime = new Date();
|
||||||
|
@ -44,7 +44,7 @@ function evalPoll(param, creator) {
|
||||||
|
|
||||||
result.url = path.weblog.polls.href();
|
result.url = path.weblog.polls.href();
|
||||||
result.message = "The poll was updated successfully!";
|
result.message = "The poll was updated successfully!";
|
||||||
result.id = newPoll._id;
|
result.id = this._id;
|
||||||
result.error = false;
|
result.error = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue