try to fix bug

This commit is contained in:
Cayo Puigdefabregas 2022-05-20 11:45:53 +02:00
parent bf455c40c9
commit 6bf419f59a
1 changed files with 3 additions and 2 deletions

View File

@ -127,11 +127,12 @@ class Lot(Thing):
if hasattr(self, 'trade'): if hasattr(self, 'trade'):
return self.trade.user_to == g.user return self.trade.user_to == g.user
return False return False
# return bool(self.trade and self.trade.user_to == g.user)
@property @property
def is_outgoing(self): def is_outgoing(self):
return bool(self.trade and self.trade.user_from == g.user) if hasattr(self, 'trade'):
return self.trade.user_to == g.user
return False
@classmethod @classmethod
def descendantsq(cls, id): def descendantsq(cls, id):