Browse files

BUGFIX - Issue #304 - Cobbler does not store values correctly for ksmeta

Objects were getting flattened improperly, so it was losing escapes/quoting for values with spaces
  • Loading branch information...
1 parent 885fd89 commit a332830bd8c20df8103cc50e502a2223e8697f38 @jimi-c jimi-c committed Sep 15, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 web/cobbler_web/views.py
View
7 web/cobbler_web/views.py
@@ -195,7 +195,8 @@ def get_fields(what, is_subobject, seed_item=None):
else:
tokens = []
for (x,y) in elem["value"].items():
- if y is not None:
+ if y is not None and y.strip() != "~":
+ y = y.replace(" ","\\ ")
tokens.append("%s=%s" % (x,y))
else:
tokens.append("%s" % x)
@@ -1036,16 +1037,14 @@ def generic_edit(request, what=None, obj_name=None, editmode="new"):
obj = None
- settings = remote.get_settings()
-
child = False
if what == "subprofile":
what = "profile"
child = True
if not obj_name is None:
editable = remote.check_access_no_fail(request.session['token'], "modify_%s" % what, obj_name)
- obj = remote.get_item(what, obj_name, True)
+ obj = remote.get_item(what, obj_name, False)
else:
editable = remote.check_access_no_fail(request.session['token'], "new_%s" % what, None)
obj = None

0 comments on commit a332830

Please sign in to comment.