Skip to content
Snippets Groups Projects
Commit 09c84d8e authored by inso's avatar inso
Browse files

Fix UID refresh

parent acd5ebfa
No related branches found
No related tags found
No related merge requests found
...@@ -405,7 +405,7 @@ class Node(QObject): ...@@ -405,7 +405,7 @@ class Node(QObject):
data = yield from bma.wot.Lookup(conn_handler, self.pubkey).get() data = yield from bma.wot.Lookup(conn_handler, self.pubkey).get()
self.state = Node.ONLINE self.state = Node.ONLINE
timestamp = 0 timestamp = 0
uid = None uid = ""
for result in data['results']: for result in data['results']:
if result["pubkey"] == self.pubkey: if result["pubkey"] == self.pubkey:
uids = result['uids'] uids = result['uids']
...@@ -413,7 +413,7 @@ class Node(QObject): ...@@ -413,7 +413,7 @@ class Node(QObject):
if uid["meta"]["timestamp"] > timestamp: if uid["meta"]["timestamp"] > timestamp:
timestamp = uid["meta"]["timestamp"] timestamp = uid["meta"]["timestamp"]
uid = uid["uid"] uid = uid["uid"]
if uid and self._uid != uid: if self._uid != uid:
self._uid = uid self._uid = uid
self.changed.emit() self.changed.emit()
except ValueError as e: except ValueError as e:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment