Remove now unnecessary workaround.

This commit is contained in:
tastytea 2020-10-15 06:02:16 +02:00
parent 43a29bfdba
commit b0c6be2366
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 1 additions and 14 deletions

View File

@ -64,20 +64,7 @@ entry_type from_json(const string_view json_string)
#endif
{}
entry.tags = json[0].at("tags").get<vector<string>>();
try
{
entry.report_time = json[0].at("report_time").get<string>();
}
// TODO: this is only necessary for compatibility with old test data. Remove
// before going live.
#if NLOHMANN_JSON_VERSION_MAJOR >= 3
catch (const nlohmann::detail::out_of_range &)
#else
catch (const std::out_of_range &)
#endif
{
entry.report_time = "1970-01-01T00:00:00";
}
entry.report_time = json[0].at("report_time").get<string>();
return entry;
}