Skip to content

Commit

Permalink
BUGFIX - Issue cobbler#304 - Cobbler does not store values correctly …
Browse files Browse the repository at this point in the history
…for ksmeta

Objects were getting flattened improperly, so it was losing escapes/quoting for values with spaces
  • Loading branch information
jimi-c committed Sep 16, 2012
1 parent 885fd89 commit a332830
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions web/cobbler_web/views.py
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a332830

Please sign in to comment.