Fix account transaction form resetting amount to 0 #1133
Reference in New Issue
Block a user
Delete Branch "zachgoll/fix-1132"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1132
@@ -15,3 +15,2 @@@entry.update!(entry_params.merge(amount: amount))@entry.sync_account_later@entry.update!(entry_params)Removed the
sync_laterbecause this triggers a refresh of the entire page (via the Sync broadcasts) which gets annoying for updating transaction details. This will cause out-of-sync data if the user changes the amount or date, but will be updated on the next sync.Eventually we'll want to get more granular with when we trigger the re-sync, but for now this feels like a decent tradeoff.
@@ -14,3 +14,2 @@def update@entry.update!(entry_params.merge(amount: amount))@entry.sync_account_later@entry.update!(entry_params)Merging in
amountcaused the scenario when we didn't include the param, it was callingnil.to_d, which resulted in 0