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

Fixed an error when a peron could not be found

parent 64a4e781
No related branches found
No related tags found
No related merge requests found
......@@ -285,7 +285,7 @@ class Account(QObject):
:return: True if the account is a member of the target community
'''
self_person = Person.lookup(self.pubkey, community)
return self_person.is_member()
return self_person.is_member(community)
def send_selfcert(self, password, community):
'''
......
......@@ -168,7 +168,7 @@ class Application(QObject):
with open(network_path, 'r') as json_data:
data = json.load(json_data)
if 'version' in data and data['version'] == __version__:
community.load_merge_network(data)
community.load_merge_network(data['network'])
else:
os.remove(network_path)
......
......@@ -101,8 +101,13 @@ class Person(object):
if cached and pubkey in Person._instances:
return Person._instances[pubkey]
else:
data = community.request(bma.wot.Lookup, req_args={'search': pubkey},
cached=cached)
try:
data = community.request(bma.wot.Lookup, req_args={'search': pubkey},
cached=cached)
except ValueError as e:
if '404' in str(e):
raise PersonNotFoundError(pubkey, community.name)
timestamp = 0
for result in data['results']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment