mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00: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):
|
def get_votes_by_block_id(connection, block_id):
|
||||||
return connection.run(
|
return connection.run(
|
||||||
r.table('votes', read_mode=READ_MODE)
|
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)
|
@register_query(RethinkDBConnection)
|
||||||
def get_votes_by_block_id_and_voter(connection, block_id, node_pubkey):
|
def get_votes_by_block_id_and_voter(connection, block_id, node_pubkey):
|
||||||
return connection.run(
|
return connection.run(
|
||||||
r.table('votes')
|
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)
|
@register_query(RethinkDBConnection)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user