fixed missing paranthesis issue with the to_dict() method

Signed-off-by: Juergen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Juergen Eckel 2019-10-08 23:24:37 +02:00
parent 17d683b3fa
commit 55ad023172

View File

@ -51,16 +51,15 @@ class TransactionListApi(Resource):
parser.add_argument('last_tx', type=parameters.valid_bool, parser.add_argument('last_tx', type=parameters.valid_bool,
required=False) required=False)
args = parser.parse_args() args = parser.parse_args()
with current_app.config['bigchain_pool']() as bigchain: with current_app.config['bigchain_pool']() as bigchain:
txs = bigchain.get_transactions_filtered(**args) txs = bigchain.get_transactions_filtered(**args)
if args['last_tx'] and args['last_tx'] is True: if args['last_tx'] and args['last_tx'] is True:
lastTX = None lastTX = None
for x in txs: for x in txs:
lastTX = x lastTX = x
if lastTX: if lastTX:
return [lastTX.to_dict] return [lastTX.to_dict()]
else: else:
return [] return []
else: else: