Commit 96e1a67a authored by Administrator's avatar Administrator
Browse files

Correctly show allowed_networks==None in show_type

parent 42e8970d
...@@ -210,10 +210,11 @@ class ProtocolTypeTable(SingleValueTable): ...@@ -210,10 +210,11 @@ class ProtocolTypeTable(SingleValueTable):
calendar_part = [self.value.calendar if self.value.calendar is not None else ""] calendar_part = [self.value.calendar if self.value.calendar is not None else ""]
if not config.CALENDAR_ACTIVE: if not config.CALENDAR_ACTIVE:
calendar_part = [] calendar_part = []
network_part = [ network_part = [Table.bool(self.value.restrict_networks)]
Table.bool(self.value.restrict_networks), if self.value.allowed_networks is not None:
", ".join(map(str.strip, self.value.allowed_networks.split(","))) network_part.append(", ".join(map(str.strip, self.value.allowed_networks.split(","))))
] else:
network_part.append("")
action_part = [Table.link(url_for("delete_type", protocoltype_id=self.value.id), "Löschen", confirm="Bist du dir sicher, dass du den Protokolltype {} löschen möchtest?".format(self.value.name))] action_part = [Table.link(url_for("delete_type", protocoltype_id=self.value.id), "Löschen", confirm="Bist du dir sicher, dass du den Protokolltype {} löschen möchtest?".format(self.value.name))]
if not self.value.has_admin_right(user): if not self.value.has_admin_right(user):
action_part = [""] action_part = [""]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment