v3 adapt v2: fix tasks creation

This commit is contained in:
Matteo Pagliazzi 2016-04-11 17:54:37 +02:00
parent 2f4f62f342
commit 020b7c5464

View file

@ -123,8 +123,8 @@ TaskSchema.methods.toJSONV2 = function toJSONV2 () {
return toJSON;
};
TaskSchema.statics.fromJSONV2 = function toJSONV2 (taskObj) {
taskObj._id = taskObj.id;
TaskSchema.statics.fromJSONV2 = function fromJSONV2 (taskObj) {
if (taskObj.id) taskObj._id = taskObj.id;
let v2Tags = taskObj.tags || {};