Fixed problem with card Cloning

This commit is contained in:
Giulio Cesare Solaroli 2016-04-08 18:06:37 +02:00
parent 72aa4ecfb6
commit 0e407eb6a6

View File

@ -836,13 +836,15 @@ Clipperz.log("Warning: User.recordWithLabel('" + aLabel + "') is returning more
var user = this;
return Clipperz.Async.callbacks("User.cloneRecord", [
MochiKit.Base.method(this, 'hasPendingChanges'),
Clipperz.Async.deferredIf("User has pending changes", [
MochiKit.Async.fail
], [
MochiKit.Base.method(user, 'createNewRecord'),
MochiKit.Base.methodcaller('setUpWithRecord', aRecord),
])
// MochiKit.Base.method(this, 'hasPendingChanges'),
// Clipperz.Async.deferredIf("User has pending changes", [
/// MochiKit.Async.fail
// ], [
// MochiKit.Base.method(user, 'createNewRecord'),
// MochiKit.Base.methodcaller('setUpWithRecord', aRecord),
// ])
MochiKit.Base.method(user, 'createNewRecord'),
MochiKit.Base.methodcaller('setUpWithRecord', aRecord),
], {trace:false});
},