summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-dockerman/luasrc
diff options
context:
space:
mode:
authorDaniel Nilsson <daniel.nilsson94@outlook.com>2024-03-17 22:14:34 +0100
committerDaniel Nilsson <daniel.nilsson94@outlook.com>2024-03-17 22:27:17 +0100
commita5d7ce06f96436dcf02970d5df8c68b65968e37c (patch)
treed76c7df1e50bef754fabf117e218fb578e1f65ee /applications/luci-app-dockerman/luasrc
parentf2a49104c4839cc61c0c6a32cf0b616ca7b7d667 (diff)
luci-app-dockerman: check for existing IPAM config
This was added in upstream with https://github.com/lisaac/luci-app-dockerman/commit/7292955a1b415bb60fa2e403bb3a437b4b7f7846 so should be fine for us to add it. Signed-off-by: Daniel Nilsson <daniel.nilsson94@outlook.com>
Diffstat (limited to 'applications/luci-app-dockerman/luasrc')
-rw-r--r--applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua
index 007e087424..f54acbd16d 100644
--- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua
+++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua
@@ -38,8 +38,8 @@ local get_networks = function ()
data[index]["_interface"] = v.Options.parent
end
- data[index]["_subnet"] = v.IPAM and v.IPAM.Config[1] and v.IPAM.Config[1].Subnet or nil
- data[index]["_gateway"] = v.IPAM and v.IPAM.Config[1] and v.IPAM.Config[1].Gateway or nil
+ data[index]["_subnet"] = v.IPAM and v.IPAM.Config and v.IPAM.Config[1] and v.IPAM.Config[1].Subnet or nil
+ data[index]["_gateway"] = v.IPAM and v.IPAM.Config and v.IPAM.Config[1] and v.IPAM.Config[1].Gateway or nil
end
return data