fixed flake issues

Signed-off-by: Juergen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Juergen Eckel 2019-10-02 14:39:29 +02:00
parent a9476719a8
commit 3ab858b785

View File

@ -41,8 +41,8 @@ class TransactionApi(Resource):
return tx.to_dict()
class TransactionListApi(Resource):
class TransactionListApi(Resource):
def get(self):
parser = reqparse.RequestParser()
parser.add_argument('operation', type=parameters.valid_operation)
@ -54,14 +54,13 @@ class TransactionListApi(Resource):
with current_app.config['bigchain_pool']() as bigchain:
txs = bigchain.get_transactions_filtered(**args)
print( txs )
if args['last_tx'] and args['last_tx']==True:
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: