From 9b91977f59dea9904ff88e240db3b123a4bd2dc7 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Thu, 7 Feb 2013 17:06:22 -0500 Subject: [PATCH] set batchupdate.obj if not already set (thanks @SlappyBag!) --- src/app/schema.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/schema.coffee b/src/app/schema.coffee index 76658e5263..20d8bb527d 100644 --- a/src/app/schema.coffee +++ b/src/app/schema.coffee @@ -69,7 +69,9 @@ module.exports.BatchUpdate = BatchUpdate = (model) -> { user: user - obj: -> obj + obj: -> + obj ?= user.get() + return obj startTransaction: -> # start a batch transaction - nothing between now and @commit() will be set immediately