mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 14:35:45 +00:00
show election status uses the governance table from now on
show election status maps the asset["data"] object properly Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
51ae9874d6
commit
23731c6d14
@ -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
|
||||
|
||||
@ -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 = ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user