diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles b/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles index 6e39219a69..6bceb36e55 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles @@ -68,6 +68,10 @@ end uci:foreach('gluon', 'interface', function(interface) local function has_role(role) + if interface.role == nil then + return false + end + return util.contains(interface.role, role) end