Problem: No need to check for txid and output

Solution: remove to unnecesary if conditional
This commit is contained in:
Vanshdeep Singh 2018-09-21 14:53:47 +02:00
parent dbe6c95784
commit 5da1cd8434

View File

@ -275,13 +275,10 @@ class TransactionLink(object):
} }
def to_query(self): def to_query(self):
if self.txid is None and self.output is None: return [{'transaction_id': self.txid,
return None 'output_index': self.output},
else: {'output_index': self.output,
return [{'transaction_id': self.txid, 'transaction_id': self.txid}]
'output_index': self.output},
{'output_index': self.output,
'transaction_id': self.txid}]
def to_uri(self, path=''): def to_uri(self, path=''):
if self.txid is None and self.output is None: if self.txid is None and self.output is None: