From 23731c6d14aa54d385b2bd17b8d2ebb13a60c6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Eckel?= Date: Mon, 9 Jan 2023 21:28:37 +0100 Subject: [PATCH] show election status uses the governance table from now on show election status maps the asset["data"] object properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Eckel --- planetmint/commands/planetmint.py | 4 +++- planetmint/lib.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/planetmint/commands/planetmint.py b/planetmint/commands/planetmint.py index 53c3b22..733341b 100644 --- a/planetmint/commands/planetmint.py +++ b/planetmint/commands/planetmint.py @@ -31,6 +31,8 @@ from planetmint.commands.election_types import elections from planetmint.version import __tm_supported_versions__ from planetmint.config import Config +from planetmint.backend.tarantool.const import TARANT_TABLE_GOVERNANCE + logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) @@ -226,7 +228,7 @@ def run_election_show(args, planet): :param planet: an instance of Planetmint """ - election = planet.get_transaction(args.election_id) + election = planet.get_transaction(args.election_id, TARANT_TABLE_GOVERNANCE) if not election: logger.error(f"No election found with election_id {args.election_id}") return diff --git a/planetmint/lib.py b/planetmint/lib.py index 941e7e3..1bd3d5a 100644 --- a/planetmint/lib.py +++ b/planetmint/lib.py @@ -710,6 +710,8 @@ class Planetmint(object): def show_election_status(self, transaction): data = transaction.assets[0] + data = data.to_dict()["data"] + if "public_key" in data.keys(): data["public_key"] = public_key_to_base64(data["public_key"]["value"]) response = ""