luci-0.9: merge r5952
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 27 Mar 2010 17:42:00 +0000 (17:42 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 27 Mar 2010 17:42:00 +0000 (17:42 +0000)
modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua

index f71561dba8b6d735d5aea33cd93372e8b4f3bc98..a411b0487c5e7ff6d87bd753f58e930f9350bebb 100644 (file)
@@ -65,7 +65,7 @@ m.uci:foreach("network", "switch",
                end
 
                s.create = function(self, section)
-                       local n = tonumber(section)
+                       local n = tonumber(section and section:match("(%d+)"))
                        if n ~= nil and n >= 0 then
                                local sn = "%s_%d" %{ x['.name'], n }
                                local rv = TypedSection.create(self, sn)