bool refactor in lot module
This commit is contained in:
parent
0d166b2b0c
commit
6fca974f04
|
@ -102,7 +102,7 @@ class Lot(Thing):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_temporary(self):
|
def is_temporary(self):
|
||||||
return False if self.trade else True
|
return not bool(self.trade)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_incoming(self):
|
def is_incoming(self):
|
||||||
|
@ -110,9 +110,7 @@ class Lot(Thing):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_outgoing(self):
|
def is_outgoing(self):
|
||||||
if self.trade and self.trade.user_from == current_user:
|
return bool(self.trade and self.trade.user_from == current_user)
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def descendantsq(cls, id):
|
def descendantsq(cls, id):
|
||||||
|
|
Reference in a new issue