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

Fixed various requests bug

parent e268ea6f
Branches
Tags
No related merge requests found
......@@ -57,7 +57,7 @@ class Certification(Document):
re_timestamp = re.compile("META:TS:([0-9]+)-([0-9a-fA-F]{5,40})\n")
def __init__(self, version, currency, pubkey_from, pubkey_to,
blockhash, blocknumber, signature):
blocknumber, blockhash, signature):
'''
Constructor
'''
......
......@@ -185,7 +185,9 @@ class Account(object):
'other': []})
def send_membership(self, password, community, type):
selfcert = Person.lookup(self.pubkey, community)
self_ = Person.lookup(self.pubkey, community)
selfcert = self_.selfcert(community)
blockid = community.current_blockid()
membership = Membership(PROTOCOL_VERSION, community.currency,
......
......@@ -102,6 +102,8 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
try:
self.account.send_membership(password, self.community, 'IN')
QMessageBox.information(self, "Membership",
"Success sending membership demand")
except ValueError as e:
QMessageBox.critical(self, "Join demand error",
str(e))
......@@ -117,6 +119,8 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
try:
self.account.send_membership(password, self.community, 'OUT')
QMessageBox.information(self, "Membership",
"Success sending leaving demand")
except ValueError as e:
QMessageBox.critical(self, "Leaving demand error",
e.message)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment