fix to previous - don't do it dynamically, do it on save

This commit is contained in:
Tyler Renelle
2013-02-27 09:15:06 -05:00
parent 01182b377d
commit 811d6de107
2 changed files with 11 additions and 12 deletions
+2 -3
View File
@@ -75,9 +75,8 @@ module.exports.app = (appExports, model) ->
appExports.restoreSave = (e, el) ->
batch = new BatchUpdate(model)
batch.startTransaction()
obj = batch.obj()
_.each obj.stats, (stat, key) -> batch.set("stats.#{key}", parseInt(stat))
_.each obj.items, (item, key) -> batch.set("items.#{key}", parseInt(item))
$('#restore-form input').each ->
batch.set $(this).attr('data-for'), parseInt($(this).val())
batch.commit()
user.on 'set', 'flags.customizationsNotification', (captures, args) ->