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