From 6bf419f59a943b7eca7d31c504635527f344100c Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 20 May 2022 11:45:53 +0200 Subject: [PATCH] try to fix bug --- ereuse_devicehub/resources/lot/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/resources/lot/models.py b/ereuse_devicehub/resources/lot/models.py index 1e1c5afe..a8e957e2 100644 --- a/ereuse_devicehub/resources/lot/models.py +++ b/ereuse_devicehub/resources/lot/models.py @@ -127,11 +127,12 @@ class Lot(Thing): if hasattr(self, 'trade'): return self.trade.user_to == g.user return False - # return bool(self.trade and self.trade.user_to == g.user) @property 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 def descendantsq(cls, id):