Browse Source

fix parent ID not being set in the JSON.

Natenom/support-murmur-13-1446181288462
Michael Ziegler 14 years ago
parent
commit
b14a168f0c
  1. 8
      pyweb/mumble/views.py

8
pyweb/mumble/views.py

@ -333,11 +333,17 @@ def mmng_tree( request, server ):
for chanid in srv.channels:
channel = srv.channels[chanid]
state = None # "removed"
if channel.parent is not None:
parent = channel.parent.chanid
else:
parent = -1
chanlist.append({
"type": "channel",
"id": channel.chanid,
"name": channel.name,
"parent": channel.parent and channel.parent.chanid or -1,
"parent": parent,
"position": channel.position,
"state": state == None and (channel.temporary and "temporary" or "permanent") or state
})

Loading…
Cancel
Save