Updated weird case path adding a sensible result and logging a warning
This commit is contained in:
parent
0dbd7eb45a
commit
cbc613da7f
@ -581,7 +581,8 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
|||||||
result = someFilteredResults[0];
|
result = someFilteredResults[0];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
WTF = TODO;
|
console.log("Warning: Record.fieldWithLabel('" + aLabel + "') is returning more than one result: " + someFilteredResults.length);
|
||||||
|
result = someFilteredResults[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -681,6 +681,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
|
|||||||
], {trace:false});
|
], {trace:false});
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'recordWithLabel': function (aLabel) {
|
'recordWithLabel': function (aLabel) {
|
||||||
return Clipperz.Async.callbacks("User.recordWithLabel", [
|
return Clipperz.Async.callbacks("User.recordWithLabel", [
|
||||||
MochiKit.Base.method(this, 'getRecords'),
|
MochiKit.Base.method(this, 'getRecords'),
|
||||||
@ -701,7 +702,8 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
|
|||||||
result = someFilteredResults[0];
|
result = someFilteredResults[0];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
WTF = TODO;
|
console.log("Warning: User.recordWithLabel('" + aLabel + "') is returning more than one result: " + someFilteredResults.length);
|
||||||
|
result = someFilteredResults[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user