mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
fixed flake issues
Signed-off-by: Juergen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
a9476719a8
commit
3ab858b785
@ -41,8 +41,8 @@ class TransactionApi(Resource):
|
|||||||
|
|
||||||
return tx.to_dict()
|
return tx.to_dict()
|
||||||
|
|
||||||
class TransactionListApi(Resource):
|
|
||||||
|
|
||||||
|
class TransactionListApi(Resource):
|
||||||
def get(self):
|
def get(self):
|
||||||
parser = reqparse.RequestParser()
|
parser = reqparse.RequestParser()
|
||||||
parser.add_argument('operation', type=parameters.valid_operation)
|
parser.add_argument('operation', type=parameters.valid_operation)
|
||||||
@ -54,14 +54,13 @@ class TransactionListApi(Resource):
|
|||||||
|
|
||||||
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)
|
||||||
print( txs )
|
if args['last_tx'] and args['last_tx'] is True:
|
||||||
if args['last_tx'] and args['last_tx']==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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user