PEP fixes

This commit is contained in:
Oliver Walters 2021-01-06 23:09:26 +11:00
parent 1d6a049c5a
commit e5b346e7fa
2 changed files with 4 additions and 3 deletions

View File

@ -566,10 +566,12 @@ class InvenTreeSetting(models.Model):
"""
try:
value = int()
value = int(self.value)
except (ValueError, TypeError):
return self.default_value()
value = self.default_value()
return value
class PriceBreak(models.Model):
"""

View File

@ -501,7 +501,6 @@ class StockItem(MPTTModel):
return self.expiry_date < expiry_date
def is_expired(self):
"""
Returns True if this StockItem is "expired".