From: Jo-Philipp Wich Date: Fri, 28 Apr 2023 21:43:31 +0000 (+0200) Subject: luci-app-dockerman: gracefully handle empty registry mirror setting X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=08fd2d544a9b6bcf92790b90a23a4a89eba9a268;p=project%2Fluci.git luci-app-dockerman: gracefully handle empty registry mirror setting Fixes: #6300 Signed-off-by: Jo-Philipp Wich (cherry picked from commit 39d387f34c083afab9589952c6bcc9a0028cc9da) --- diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/overview.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/overview.lua index dd4828b34f..022664738d 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/overview.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/overview.lua @@ -65,7 +65,7 @@ if docker.new():_ping().code == 200 then end docker_info_table['8IndexServerAddress']._value = docker_info.body.IndexServerAddress - for i, v in ipairs(docker_info.body.RegistryConfig.Mirrors) do + for i, v in ipairs(docker_info.body.RegistryConfig.Mirrors or {}) do docker_info_table['9RegistryMirrors']._value = docker_info_table['9RegistryMirrors']._value == "-" and v or (docker_info_table['9RegistryMirrors']._value .. ", " .. v) end