From f424f4f17546b432b73b818a99de1609bd53cb89 Mon Sep 17 00:00:00 2001 From: Lorenz Herzberger Date: Wed, 1 Jun 2022 13:47:22 +0200 Subject: [PATCH] removed .data from select queries Signed-off-by: Lorenz Herzberger --- planetmint/backend/tarantool/query.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/planetmint/backend/tarantool/query.py b/planetmint/backend/tarantool/query.py index 2c07bdb..0678add 100644 --- a/planetmint/backend/tarantool/query.py +++ b/planetmint/backend/tarantool/query.py @@ -23,14 +23,14 @@ def _group_transaction_by_ids(connection, txids: list): _transactions = [] for txid in txids: _txobject = connection.run(connection.space("transactions").select(txid, index="id_search")) - if len(_txobject.data) == 0: + if len(_txobject) == 0: continue - _txobject = _txobject.data[0] - _txinputs = connection.run(connection.space("inputs").select(txid, index="id_search").data) - _txoutputs = connection.run(connection.space("outputs").select(txid, index="id_search").data) - _txkeys = connection.run(connection.space("keys").select(txid, index="txid_search").data) - _txassets = connection.run(connection.space("assets").select(txid, index="txid_search").data) - _txmeta = connection.run(connection.space("meta_data").select(txid, index="id_search").data) + _txobject = _txobject[0] + _txinputs = connection.run(connection.space("inputs").select(txid, index="id_search")) + _txoutputs = connection.run(connection.space("outputs").select(txid, index="id_search")) + _txkeys = connection.run(connection.space("keys").select(txid, index="txid_search")) + _txassets = connection.run(connection.space("assets").select(txid, index="txid_search")) + _txmeta = connection.run(connection.space("meta_data").select(txid, index="id_search")) _txinputs = sorted(_txinputs, key=itemgetter(6), reverse=False) _txoutputs = sorted(_txoutputs, key=itemgetter(8), reverse=False)