[ugc] generator log warnings fix

This commit is contained in:
Arsentiy Milchakov 2017-10-17 13:49:00 +03:00 committed by r.kuznetsov
parent 31ea759de3
commit d63168e627

View file

@ -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;
}