From 429d299b232e02dc1eca839b72887f01d300120c Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 18 Jul 2016 15:07:10 +0200 Subject: [PATCH] simplify query --- bigchaindb/core.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bigchaindb/core.py b/bigchaindb/core.py index a4afa583..3ee5541d 100644 --- a/bigchaindb/core.py +++ b/bigchaindb/core.py @@ -577,9 +577,8 @@ class Bigchain(object): # get the latest value for the vote timestamp (over all votes) max_timestamp = r.table('votes') \ .filter(r.row['node_pubkey'] == self.me) \ - .concat_map(lambda x: [x['vote']['timestamp']]) \ - .max() \ - .run(self.conn) + .max(lambda x: x['vote']['timestamp']) \ + .run(self.conn)['vote']['timestamp'] last_voted = list(r.table('votes') \ .filter(r.row['node_pubkey'] == self.me) \