From 5da1cd8434a45b249f1b4b00afd4204895c6518d Mon Sep 17 00:00:00 2001 From: Vanshdeep Singh Date: Fri, 21 Sep 2018 14:53:47 +0200 Subject: [PATCH] Problem: No need to check for txid and output Solution: remove to unnecesary if conditional --- bigchaindb/common/transaction.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bigchaindb/common/transaction.py b/bigchaindb/common/transaction.py index af3a0de3..f4456396 100644 --- a/bigchaindb/common/transaction.py +++ b/bigchaindb/common/transaction.py @@ -275,13 +275,10 @@ class TransactionLink(object): } def to_query(self): - if self.txid is None and self.output is None: - return None - else: - return [{'transaction_id': self.txid, - 'output_index': self.output}, - {'output_index': self.output, - 'transaction_id': self.txid}] + return [{'transaction_id': self.txid, + 'output_index': self.output}, + {'output_index': self.output, + 'transaction_id': self.txid}] def to_uri(self, path=''): if self.txid is None and self.output is None: