Bug fixes file upload and download

This commit is contained in:
2020-04-11 22:47:54 +02:00
parent 91cbe58e09
commit c5c601cffe
5 changed files with 30 additions and 3 deletions

View File

@@ -80,7 +80,10 @@ public class TransactionService {
buildTransaction(fromAccount, toAccount, amount, description, date, recurringTransaction, taxRelevant);
transaction.setPeriods(getRelevantPeriods(transaction));
transaction.setFiles(Collections.singleton(buildFile(fileName, fileContent)));
if (StringUtils.isNotEmpty(fileName) && StringUtils.isNotEmpty(fileContent)) {
transaction.setFiles(Collections.singleton(buildFile(fileName, fileContent)));
}
fromAccount.setCurrentBalance(fromAccount.getCurrentBalance() + (this.ruleService
.getMultiplierFromAccount(fromAccount) * amount));