Fix bug with simple refs support (not lists)

This commit is contained in:
Denis Koronchik 2017-09-13 19:45:30 +03:00 committed by Patrick Niklaus
parent 5fd77aebb5
commit a05e9c4932
2 changed files with 2 additions and 14 deletions

View File

@ -404,7 +404,7 @@ function process_way(profile, way, result, relations)
matched_refs = Relations.MatchToRef(relations, result.ref)
local ref = ''
for k ,v in pairs(matched_refs) do
for k, v in pairs(matched_refs) do
if ref ~= '' then
ref = ref .. '; '
end
@ -412,25 +412,13 @@ function process_way(profile, way, result, relations)
if v then
ref = ref .. k .. ' $' .. v
else
print(ref)
ref = ref .. k
end
end
result.ref = ref
-- count = 0
-- for k, v in pairs(matched_refs) do
-- count = count + 1
-- end
-- if count > 1 then
-- print('---', way:id())
-- for k, v in pairs(matched_refs) do
-- print(k, v)
-- end
-- end
end
end
function process_relation(profile, relation, result)

View File

@ -49,7 +49,7 @@ function Relations.MatchToRef(relations, ref)
local result_match = {}
for _, r in ipairs(references) do
result_match[r] = nil
result_match[r] = false
end
for _, rel in ipairs(relations) do