hledger-web: actually add transaction to the selected journal file
Author | erictapen |
---|---|
Pull request | https://github.com/simonmichael/hledger/pull/1873 |
Description
[Fix for #1229]
The hledger-web interface currently allows for selecting a file on which to append a transaction, but currently that data isn't used anywhere. It just writes to the default file, regardless of the selection.
My solution is somewhat of a hack; I use the tsourcepos
metadata in the Transaction
type to carry the preffered journal file around.
Also this currently has the security implication, that it allows users to append transactions to arbitrary files. It probably would make sense to only restrict this to the files that are discovered by hledger, but I'm not familiar with the logic.