forked from organicmaps/organicmaps-tmp
[ugc] generator log warnings fix
This commit is contained in:
parent
31ea759de3
commit
d63168e627
1 changed files with 7 additions and 2 deletions
|
@ -29,9 +29,14 @@ bool UGCTranslator::TranslateUGC(osm::Id const & id, ugc::UGC & ugc)
|
|||
|
||||
my::Json json(str);
|
||||
|
||||
if (json_array_size(json.get()) != 1)
|
||||
auto const size = json_array_size(json.get());
|
||||
|
||||
if (size == 0)
|
||||
return false;
|
||||
|
||||
if (size > 1)
|
||||
{
|
||||
LOG(LWARNING, ("Osm id duplication in UGC database", id));
|
||||
LOG(LWARNING, ("Osm id duplication in UGC database", id.EncodedId()));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue