Skip to content

Commit

Permalink
fix(models_mod/targetgroup.py): Fix simplejson def
Browse files Browse the repository at this point in the history
  • Loading branch information
Aguay-val committed Jun 27, 2019
1 parent ec32b6b commit 427da23
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions passhportd/app/models_mod/targetgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def simplejson(self):
output = "{\n"

output = output + "\"Name\": \"" + format(self.name) + "\",\n"
output = output + "\"Comment\": \"" + format(self.comment) + "\",\n"
output = output + "\"Comment\": \"" + format(self.comment) + "\"\n"
output = output + "}"

return output
Expand Down Expand Up @@ -109,7 +109,7 @@ def prepare_delete(self):
self.tgadmins.pop()

return self


# User management
def is_members(self, user):
Expand Down Expand Up @@ -288,7 +288,7 @@ def accessible_target_list(self, parsed_targetgroups = None, style="object"):
style = "object"):
if target not in targets:
targets.append(target)
# Return target objects or names depending of the style
# Return target objects or names depending of the style
if style == "names":
targetnames = []
for target in targets:
Expand Down Expand Up @@ -386,7 +386,7 @@ def addtargetgroup(self, targetgroup):
"""Add a targetgroup to the relaton table"""
if not self.is_tgmembers(targetgroup) and not self == targetgroup:
self.tgmembers.append(targetgroup)
else:
else:
return False

return self
Expand All @@ -410,7 +410,7 @@ def memberof(self, obj):
members.append(targetgroup)
else:
return "Error in object type"

ret = "["
for m in members:
ret = ret + m.name + ","
Expand Down Expand Up @@ -456,11 +456,11 @@ def all_targetgroupname_list(self, parsed_targetgroups = None):
return targetgroupnames

def show_targets(self, indentation):
"""Return a formated list of the targets that the targetgroup
"""Return a formated list of the targets that the targetgroup
provides
"""
listing = []

indent = ""
for i in range(indentation):
indent = indent + " "
Expand Down

0 comments on commit 427da23

Please sign in to comment.