luci-app-olsr: handle empty result for non-status tables
[oweals/luci.git] / modules / luci-mod-system / luasrc / model / cbi / admin_system / fstab.lua
index 6f0921fdcfac417b5f35ab5e2019d767cced3895..4a31146a03e13cf735865e9b5067dcd85df82780 100644 (file)
@@ -117,14 +117,14 @@ function used.cfgvalue(self, section)
 end
 
 unmount = v:option(Button, "unmount", translate("Unmount"))
+function unmount.cfgvalue(self, section)
+       return non_system_mounts[section].umount
+end
+
 unmount.render = function(self, section, scope)
-       if non_system_mounts[section].umount then
-               self.title = translate("Unmount")
-               self.inputstyle = "remove"
-               Button.render(self, section, scope)
-       else
-               luci.http.write(" ")
-       end
+       self.title = translate("Unmount")
+       self.inputstyle = "remove"
+       Button.render(self, section, scope)
 end
 
 unmount.write = function(self, section)