actually fix groupTableCheck

This commit is contained in:
Lukas Kropatschek 2016-01-13 00:36:04 +01:00
parent 864e89d43b
commit 12f2a39465

View File

@ -2765,16 +2765,16 @@ do -- group functions scope
function mist.groupTableCheck(groupData) function mist.groupTableCheck(groupData)
-- return false if country, category -- return false if country, category
-- or units are missing -- or units are missing
if not groupData.country and if not groupData.country or
not groupData.category and not groupData.category or
not groupData.units then not groupData.units then
return false return false
end end
-- return false if unitData misses -- return false if unitData misses
-- x, y or type -- x, y or type
for unitId, unitData in pairs(groupData.units) do for unitId, unitData in pairs(groupData.units) do
if not unitData.x and if not unitData.x or
not unitData.y and not unitData.y or
not unitData.type then not unitData.type then
return false return false
end end