luci-app-dockerman: fix unhandled nil on containers page
authorAnton Luzgin <[email protected]>
Fri, 28 Nov 2025 08:42:32 +0000 (12:42 +0400)
committerPaul Donald <[email protected]>
Wed, 3 Dec 2025 21:19:19 +0000 (22:19 +0100)
applications/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua

index a48118ec0c7d3f0fb5d7a416b1ee81906cb0ddb6..2a337a62a9b1b83c9732ffe560ac6fe280bf13eb 100644 (file)
@@ -77,7 +77,7 @@ function get_containers()
 
                for ii,iv in ipairs(images) do
                        if iv.Id == v.ImageID then
-                               data[index]["_image"] = iv.RepoTags and iv.RepoTags[1] or (iv.RepoDigests[1]:gsub("(.-)@.+", "%1") .. ":<none>")
+                               data[index]["_image"] = iv.RepoTags and iv.RepoTags[1] or ((iv.RepoDigests[1] or ""):gsub("(.-)@.+", "%1") .. ":<none>")
                        end
                end