mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-06-17 18:13:22 +02:00
Filter out block id
This commit is contained in:
parent
ff583c5546
commit
24a701096d
|
@ -120,14 +120,16 @@ def get_owned_ids(connection, owner):
|
|||
def get_votes_by_block_id(connection, block_id):
|
||||
return connection.run(
|
||||
r.table('votes', read_mode=READ_MODE)
|
||||
.between([block_id, r.minval], [block_id, r.maxval], index='block_and_voter'))
|
||||
.between([block_id, r.minval], [block_id, r.maxval], index='block_and_voter')
|
||||
.without('id'))
|
||||
|
||||
|
||||
@register_query(RethinkDBConnection)
|
||||
def get_votes_by_block_id_and_voter(connection, block_id, node_pubkey):
|
||||
return connection.run(
|
||||
r.table('votes')
|
||||
.get_all([block_id, node_pubkey], index='block_and_voter'))
|
||||
.get_all([block_id, node_pubkey], index='block_and_voter')
|
||||
.without('id'))
|
||||
|
||||
|
||||
@register_query(RethinkDBConnection)
|
||||
|
|
Loading…
Reference in New Issue
Block a user