mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
simplify query
This commit is contained in:
parent
003d4b8310
commit
0de838c40f
@ -167,8 +167,8 @@ class Bigchain(object):
|
||||
break
|
||||
|
||||
# Query the transaction in the target block and return
|
||||
response = r.table('bigchain').filter(lambda block: block['id'] == target_block_id).nth(0)\
|
||||
.get_field('block').get_field('transactions').filter(lambda tx: tx['id'] == txid).run(self.conn)
|
||||
response = r.table('bigchain').get(target_block_id).get_field('block')\
|
||||
.get_field('transactions').filter(lambda tx: tx['id'] == txid).run(self.conn)
|
||||
|
||||
return response[0]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user