fixed bug : roll back caused from_dict call on a None object (#327)

* fixed bug : roll back caused from_dict call on a None object

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* blackified

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* simplified fix

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* blackified

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

---------

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2023-02-21 10:57:37 +01:00 committed by GitHub
parent 979af5e453
commit 89b5427e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -919,7 +919,7 @@ class Planetmint(object):
txns = [self.get_transaction(tx_id) for tx_id in txn_ids] txns = [self.get_transaction(tx_id) for tx_id in txn_ids]
txns = [Transaction.from_dict(tx.to_dict()) for tx in txns] txns = [Transaction.from_dict(tx.to_dict()) for tx in txns if tx]
elections = self._get_votes(txns) elections = self._get_votes(txns)
for election_id in elections: for election_id in elections: