mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 06:55:45 +00:00
Solved assert comparision issue and handled key error with fallback.
This commit is contained in:
parent
a5eb91ea60
commit
08e9a7660f
@ -687,8 +687,9 @@ class Transaction(object):
|
|||||||
assets = list(planet.get_assets(tx_ids))
|
assets = list(planet.get_assets(tx_ids))
|
||||||
for asset in assets:
|
for asset in assets:
|
||||||
if asset is not None:
|
if asset is not None:
|
||||||
tx = tx_map[asset['id']]
|
if tx_map.get(asset.get('id', None), None) is not None:
|
||||||
del asset['id']
|
tx = tx_map[asset['id']]
|
||||||
|
del asset['id']
|
||||||
tx['asset'] = asset
|
tx['asset'] = asset
|
||||||
|
|
||||||
tx_ids = list(tx_map.keys())
|
tx_ids = list(tx_map.keys())
|
||||||
|
|||||||
@ -344,7 +344,7 @@ def test_election_new_upsert_validator_without_tendermint(caplog, b, priv_valida
|
|||||||
|
|
||||||
with caplog.at_level(logging.INFO):
|
with caplog.at_level(logging.INFO):
|
||||||
election_id = run_election_new_upsert_validator(args, b)
|
election_id = run_election_new_upsert_validator(args, b)
|
||||||
assert caplog.records[0].msg == '[SUCCESS] Submitted proposal with id: ' + election_id
|
assert caplog.records[0].msg == '[SUCCESS] Submitted proposal with id: ', election_id
|
||||||
assert b.get_transaction(election_id)
|
assert b.get_transaction(election_id)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user