From 2d9e4b088bcee6aaad8bc5e46d40be3721c23db9 Mon Sep 17 00:00:00 2001
From: Inso <insomniak.fr@gmail.com>
Date: Thu, 10 Sep 2015 21:24:55 +0200
Subject: [PATCH] Fix bug with dividend reading when block is not downloaded
 yet

---
 src/cutecoin/core/community.py      | 2 +-
 src/cutecoin/core/money/relative.py | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/cutecoin/core/community.py b/src/cutecoin/core/community.py
index 8ada1352..8c2aec28 100644
--- a/src/cutecoin/core/community.py
+++ b/src/cutecoin/core/community.py
@@ -142,7 +142,7 @@ class Community(QObject):
         :return: The computed UD or 1 if no UD was generated.
         """
         block = self.get_ud_block()
-        if block:
+        if block and block != qtbma.blockchain.Block.null_value:
             return math.ceil(
                 max(
                     self.dividend,
diff --git a/src/cutecoin/core/money/relative.py b/src/cutecoin/core/money/relative.py
index ea6492af..39aab280 100644
--- a/src/cutecoin/core/money/relative.py
+++ b/src/cutecoin/core/money/relative.py
@@ -25,8 +25,7 @@ class Relative():
 
     def value(self):
         """
-        Return relaive value of amount
-    type
+        Return relative value of amount
         :param int amount:   Value
         :param cutecoin.core.community.Community community: Community instance
         :return: float
-- 
GitLab