mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't warn about an invalid date if it's just an empty column.
This commit is contained in:
parent
8de1625db8
commit
4e04f6e51d
@ -399,10 +399,14 @@ GncSqlColumnTableEntryImpl<CT_TIMESPEC>::load (const GncSqlBackend* sql_be,
|
|||||||
GncDateTime time(val);
|
GncDateTime time(val);
|
||||||
ts.tv_sec = static_cast<time64>(time);
|
ts.tv_sec = static_cast<time64>(time);
|
||||||
}
|
}
|
||||||
catch (std::invalid_argument&)
|
catch (const std::invalid_argument& err)
|
||||||
{
|
{
|
||||||
PWARN("An invalid date was found in your database."
|
if (strcmp(err.what(), "Column empty.") != 0)
|
||||||
"It has been set to 1 January 1970.");
|
{
|
||||||
|
auto val = row.get_string_at_col(m_col_name);
|
||||||
|
PWARN("An invalid date %s was found in your database."
|
||||||
|
"It has been set to 1 January 1970.", val.c_str());
|
||||||
|
}
|
||||||
ts.tv_sec = 0;
|
ts.tv_sec = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user