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