Skip to content

Commit

Permalink
Merge pull request #62 from littleskunk/patch-4
Browse files Browse the repository at this point in the history
removed duplicate DB query
  • Loading branch information
F483 committed Sep 14, 2015
2 parents 5afa4bf + 51d7994 commit c10596a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dataserv/Farmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ def register(self, payout_addr=None):

def exists(self):
"""Check to see if this address is already listed."""
query = db.session.query(Farmer.btc_addr)
return query.filter(Farmer.btc_addr == self.btc_addr).count() > 0
return Farmer.query.filter(Farmer.btc_addr == self.btc_addr).count() > 0

def lookup(self):
"""Return the Farmer object for the bitcoin address passed."""
Expand Down

0 comments on commit c10596a

Please sign in to comment.