From fd4854b53c5b8206d41bfa06dec470268b44d6e3 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 13 Dec 2007 17:11:36 -0500 Subject: Make WebUI deletions of distro objects work again --- cobbler/webui/CobblerWeb.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cobbler/webui') diff --git a/cobbler/webui/CobblerWeb.py b/cobbler/webui/CobblerWeb.py index 2869731..4569111 100644 --- a/cobbler/webui/CobblerWeb.py +++ b/cobbler/webui/CobblerWeb.py @@ -245,6 +245,11 @@ class CobblerWeb(object): if not self.__xmlrpc_setup(): return self.xmlrpc_auth_failure() + + # pre-command paramter checking + # HTML forms do not transmit disabled fields + if name is None and new_or_edit == 'edit' and oldname is not None: + name = oldname # handle deletes as a special case if new_or_edit == 'edit' and delete1 and delete2: @@ -254,9 +259,6 @@ class CobblerWeb(object): return self.error_page("could not delete %s, %s" % (name,str(e))) return self.distro_list() - # pre-command paramter checking - if name is None and editmode=='edit' and oldname is not None: - name = oldname if name is None: return self.error_page("name is required") if kernel is None or not str(kernel).startswith("/"): -- cgit