Skip to content

Commit

Permalink
Fixed data import
Browse files Browse the repository at this point in the history
  • Loading branch information
mvarnagiris committed Oct 19, 2014
1 parent 4c5a9d6 commit 932fbde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 932fbde

Please sign in to comment.