mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Check for a blank line on the transaction importer
If you have some blank lines, just newlines at the end of file and you have an account column and do not remove them you will get an error advising that there is no account column selected or account specified so this change removes them from being parsed.
This commit is contained in:
parent
a4bbaf968f
commit
cdf348df24
@ -392,11 +392,12 @@ void GncTxImport::tokenize (bool guessColTypes)
|
||||
m_parsed_lines.clear();
|
||||
for (auto tokenized_line : m_tokenizer->get_tokens())
|
||||
{
|
||||
m_parsed_lines.push_back (std::make_tuple (tokenized_line, std::string(),
|
||||
std::make_shared<GncPreTrans>(date_format()),
|
||||
std::make_shared<GncPreSplit>(date_format(), currency_format()),
|
||||
false));
|
||||
auto length = tokenized_line.size();
|
||||
if (length > 0)
|
||||
m_parsed_lines.push_back (std::make_tuple (tokenized_line, std::string(),
|
||||
std::make_shared<GncPreTrans>(date_format()),
|
||||
std::make_shared<GncPreSplit>(date_format(), currency_format()),
|
||||
false));
|
||||
if (length > max_cols)
|
||||
max_cols = length;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user