summaryrefslogtreecommitdiff
path: root/src/csv.cc
diff options
context:
space:
mode:
authorJohann Klähn <kljohann@gmail.com>2012-10-13 19:38:42 +0200
committerJohann Klähn <kljohann@gmail.com>2012-10-13 19:39:10 +0200
commit1f2fe401f1e98a9a1d3122b79593e12a668bfb43 (patch)
tree6648c75fb260b99bab2fa199a1f47e10db079398 /src/csv.cc
parentc2cc47bc986fbceedf79af55eb87b46fa99fe497 (diff)
downloadfork-ledger-1f2fe401f1e98a9a1d3122b79593e12a668bfb43.tar.gz
fork-ledger-1f2fe401f1e98a9a1d3122b79593e12a668bfb43.tar.bz2
fork-ledger-1f2fe401f1e98a9a1d3122b79593e12a668bfb43.zip
ignore (some) empty field when converting csv
This fixes bug #733 and bug #734.
Diffstat (limited to 'src/csv.cc')
-rw-r--r--src/csv.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/csv.cc b/src/csv.cc
index 71b6516a..aca69307 100644
--- a/src/csv.cc
+++ b/src/csv.cc
@@ -175,7 +175,8 @@ xact_t * csv_reader::read_xact(bool rich_data)
break;
case FIELD_DATE_AUX:
- xact->_date_aux = parse_date(field);
+ if (! field.empty())
+ xact->_date_aux = parse_date(field);
break;
case FIELD_CODE:
@@ -224,7 +225,8 @@ xact_t * csv_reader::read_xact(bool rich_data)
break;
case FIELD_NOTE:
- xact->note = field;
+ if (! field.empty())
+ xact->note = field;
break;
case FIELD_UNKNOWN: