Skip to content

Commit

Permalink
network.latest_transmission_recipient: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmorgan committed Jun 15, 2015
1 parent f918123 commit 697f359
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wallace/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ def latest_transmission_recipient(self, failed=False):

if failed == "all":
ts = Transmission.query\
.filter(Transmission.status == "received")\
.filter(and_(Transmission.status == "received", Transmission.network_uuid == self.uuid))\
.all()
else:
ts = Transmission.query\
.join(Transmission.destination)\
.filter(and_(Transmission.status == "received", Node.failed == failed))\
.filter(and_(Transmission.status == "received", Transmission.network_uuid == self.uuid, Node.failed == failed))\
.all()
if ts:
t = max(ts, key=attrgetter('receive_time'))
Expand Down

0 comments on commit 697f359

Please sign in to comment.