kopia lustrzana https://gitlab.com/tomaszg/geostat
Fix ocdb to correctly read German cache names as well
rodzic
d423d58714
commit
5f99c8019b
2
ocdb.cpp
2
ocdb.cpp
|
@ -154,6 +154,8 @@ bool OCdb::update_cache(const json& j) {
|
||||||
fields["name"] = j["data"]["names"]["pl"].get<std::string>();
|
fields["name"] = j["data"]["names"]["pl"].get<std::string>();
|
||||||
else if (j["data"].count("names") && j["data"]["names"].count("en") && !j["data"]["names"]["en"].is_null())
|
else if (j["data"].count("names") && j["data"]["names"].count("en") && !j["data"]["names"]["en"].is_null())
|
||||||
fields["name"] = j["data"]["names"]["en"].get<std::string>();
|
fields["name"] = j["data"]["names"]["en"].get<std::string>();
|
||||||
|
else if (j["data"].count("names") && j["data"]["names"].count("de") && !j["data"]["names"]["de"].is_null())
|
||||||
|
fields["name"] = j["data"]["names"]["de"].get<std::string>();
|
||||||
if (j["data"].count("location") && !j["data"]["location"].is_null())
|
if (j["data"].count("location") && !j["data"]["location"].is_null())
|
||||||
fields["location"] = j["data"]["location"].get<std::string>();
|
fields["location"] = j["data"]["location"].get<std::string>();
|
||||||
if (j["data"].count("type") && !j["data"]["type"].is_null())
|
if (j["data"].count("type") && !j["data"]["type"].is_null())
|
||||||
|
|
Ładowanie…
Reference in New Issue