]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix legacy new transaction submission with no date (use today's)
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 2 Oct 2020 05:49:22 +0000 (08:49 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 2 Oct 2020 05:49:22 +0000 (08:49 +0300)
broken in 0.15.0

app/src/main/java/net/ktnx/mobileledger/async/SendTransactionTask.java

index 9754a84e008f419430a1b35cafdeffbe6b5181c2..796da9310d5fcf8445b505b846785aa8e62207aa 100644 (file)
@@ -177,7 +177,9 @@ public class SendTransactionTask extends AsyncTask<LedgerTransaction, Void, Void
         if (token != null)
             params.addPair("_token", token);
 
-        SimpleDate transactionDate = transaction.getDate();
+        SimpleDate transactionDate = transaction.getDateIfAny();
+        if (transactionDate == null)
+            transactionDate = SimpleDate.today();
 
         params.addPair("date", Globals.formatLedgerDate(transactionDate));
         params.addPair("description", transaction.getDescription());