dont fail without nodes

This commit is contained in:
j 2016-01-05 23:22:17 +05:30
parent 55ba49b631
commit 8aef4a62ef

View file

@ -87,6 +87,7 @@ def getUsers(data):
for u in models.User.query.filter(models.User.id!=settings.USER_ID).all(): for u in models.User.query.filter(models.User.id!=settings.USER_ID).all():
users.append(u.json()) users.append(u.json())
ids.add(u.id) ids.add(u.id)
if state.nodes:
for id in state.nodes._local._nodes: for id in state.nodes._local._nodes:
if id not in ids: if id not in ids:
n = state.nodes._local._nodes[id].copy() n = state.nodes._local._nodes[id].copy()