From ecbeaa0b2517f7ffde1d98fd95abf96beb6e4c0e Mon Sep 17 00:00:00 2001 From: Scott Sadler Date: Thu, 24 Nov 2016 16:36:38 +0100 Subject: [PATCH] vote.id doesn't exist in server --- bigchaindb/db/backends/rethinkdb.py | 6 ++++-- docs/server/source/data-models/vote-model.md | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bigchaindb/db/backends/rethinkdb.py b/bigchaindb/db/backends/rethinkdb.py index 39d2aff9..55535c65 100644 --- a/bigchaindb/db/backends/rethinkdb.py +++ b/bigchaindb/db/backends/rethinkdb.py @@ -230,7 +230,8 @@ class RethinkDBBackend: """ return self.connection.run( r.table('votes', read_mode=self.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')) def get_votes_by_block_id_and_voter(self, block_id, node_pubkey): """Get all the votes casted for a specific block by a specific voter. @@ -244,7 +245,8 @@ class RethinkDBBackend: """ return self.connection.run( r.table('votes', read_mode=self.read_mode) - .get_all([block_id, node_pubkey], index='block_and_voter')) + .get_all([block_id, node_pubkey], index='block_and_voter') + .without('id')) def write_block(self, block, durability='soft'): """Write a block to the bigchain table. diff --git a/docs/server/source/data-models/vote-model.md b/docs/server/source/data-models/vote-model.md index 25d5029c..dc2b6ae4 100644 --- a/docs/server/source/data-models/vote-model.md +++ b/docs/server/source/data-models/vote-model.md @@ -4,7 +4,6 @@ A vote has the following structure: ```json { - "id": "", "node_pubkey": "", "vote": { "voting_for_block": "",