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,
required=False)
args = parser.parse_args()
with current_app.config['bigchain_pool']() as bigchain:
txs = bigchain.get_transactions_filtered(**args)
if args['last_tx'] and args['last_tx'] is True:
lastTX = None
for x in txs:
lastTX = x
if lastTX:
return [lastTX.to_dict]
return [lastTX.to_dict()]
else:
return []
else: