diff --git a/src/cutecoin/core/community.py b/src/cutecoin/core/community.py index 0f3cf086094fc8b850811b04c08937d25e1b8257..c43f5faba9156513bd8ccf6a6c1b1ddc094e46cf 100644 --- a/src/cutecoin/core/community.py +++ b/src/cutecoin/core/community.py @@ -30,6 +30,7 @@ class Community(object): # After initializing the community from latest peers, # we refresh its peers tree + logging.debug("Creating community") found_peers = self.peering() for p in found_peers: if p.pubkey not in [peer.pubkey for peer in peers]: diff --git a/src/cutecoin/gui/process_cfg_account.py b/src/cutecoin/gui/process_cfg_account.py index 8843f1c874189de0c07eff095d2edcabbb34eb63..3fa823e76298da9c930b80c8cca1bb3a67fdd6c3 100644 --- a/src/cutecoin/gui/process_cfg_account.py +++ b/src/cutecoin/gui/process_cfg_account.py @@ -106,16 +106,7 @@ class StepPageCommunities(Step): return True def process_next(self): - ''' - We create the community - ''' - logging.debug("Communities NEXT ") - server = self.config_dialog.lineedit_server.text() - port = self.config_dialog.spinbox_port.value() - account = self.config_dialog.account - self.config_dialog.community = account.add_community(server, port) - - self.config_dialog.refresh() + pass def display_page(self): logging.debug("Communities DISPLAY") diff --git a/src/cutecoin/gui/process_cfg_community.py b/src/cutecoin/gui/process_cfg_community.py index 1586b7038fc8263eb897497dd93eebe0ab491788..5fc7a86c03a034ac5fe148723ec3acf5c75e0f70 100644 --- a/src/cutecoin/gui/process_cfg_community.py +++ b/src/cutecoin/gui/process_cfg_community.py @@ -190,6 +190,7 @@ class ProcessConfigureCommunity(QDialog, Ui_CommunityConfigurationDialog): else: return - self.account.add_community(self.community) + if self.community not in self.account.communities: + self.account.add_community(self.community) self.accepted.emit() self.close()