diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 5651a401de..5c04f9a7e9 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -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): """ diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 533aca7596..d399c0daf1 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -501,7 +501,6 @@ class StockItem(MPTTModel): return self.expiry_date < expiry_date - def is_expired(self): """ Returns True if this StockItem is "expired".