Apparently database dump can contain cache codes with no data. Don't crash in that case

master
Tomasz Golinski 2021-01-03 04:52:34 +01:00
rodzic 490714ec43
commit 1f558ef50d
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -151,6 +151,7 @@ Caches Okapi::get_caches(const std::set<std::string>& codes) const {
codes_list.clear();
for (auto& el : j.items()) {
if (el.value().is_null()) continue;
c.code = el.value()["code"];
c.name = el.value()["name"];
c.type = el.value()["type"];