diff --git a/financius/src/main/java/com/code44/finance/data/backup/BackupDataImporter.java b/financius/src/main/java/com/code44/finance/data/backup/BackupDataImporter.java index d975e630..6bd303ab 100644 --- a/financius/src/main/java/com/code44/finance/data/backup/BackupDataImporter.java +++ b/financius/src/main/java/com/code44/finance/data/backup/BackupDataImporter.java @@ -200,6 +200,9 @@ private void importTransactions(JsonObject json) { model.setTransactionState(TransactionState.fromInt(modelJson.get("transaction_state").getAsInt())); model.setTransactionType(TransactionType.fromInt(modelJson.get("transaction_type").getAsInt())); model.setIncludeInReports(modelJson.get("include_in_reports").getAsBoolean()); + if (model.getTransactionType() == TransactionType.Transfer) { + model.setCategory(null); + } valuesList.add(model.asValues()); } insert(valuesList, TransactionsProvider.uriTransactions()); diff --git a/financius/src/main/java/com/code44/finance/data/backup/DataImporterRunnable.java b/financius/src/main/java/com/code44/finance/data/backup/DataImporterRunnable.java index afe53a8e..b37d3dde 100644 --- a/financius/src/main/java/com/code44/finance/data/backup/DataImporterRunnable.java +++ b/financius/src/main/java/com/code44/finance/data/backup/DataImporterRunnable.java @@ -19,7 +19,7 @@ public DataImporterRunnable(EventBus eventBus, DataImporter dataImporter) { eventBus.post(dataImporter); } catch (Exception e) { e.printStackTrace(); - eventBus.post(new ImportError("Data import has failed.", e)); + eventBus.post(new ImportError("Data import has failed. " + e.getMessage(), e)); } finally { IOUtils.closeQuietly(dataImporter); }