luci-app-dockerman: cbi/volmes fix volume remove
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 22 Jul 2020 12:58:26 +0000 (14:58 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 28 Jul 2020 12:16:14 +0000 (14:16 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-dockerman/luasrc/model/cbi/dockerman/volumes.lua

index 4a1c905a1e4be3f006b8e529a4c26de32d46cb4c..8dae4a020d7fa176f6fbaffea1d98a8065a0a56a 100644 (file)
@@ -3,7 +3,6 @@ LuCI - Lua Configuration Interface
 Copyright 2019 lisaac <https://github.com/lisaac/luci-app-dockerman>
 ]]--
 
-
 local docker = require "luci.model.docker"
 local dk = docker.new()
 
@@ -113,9 +112,9 @@ o.forcewrite = true
 o.write = function(self, section)
        local volume_selected = {}
 
-       for _, volume_table_sid in ipairs(volume_list) do
-               if volume_list[volume_table_sid]._selected == 1 then
-                       volume_selected[#volume_selected+1] = volume_table_sid
+       for k in pairs(volume_list) do
+               if volume_list[k]._selected == 1 then
+                       volume_selected[#volume_selected+1] = k
                end
        end