2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 20:20:58 +00:00

PEP fixes

This commit is contained in:
Oliver Walters
2022-05-01 22:46:50 +10:00
parent d72efc3757
commit e3c3ed28da
2 changed files with 13 additions and 12 deletions

View File

@ -461,7 +461,7 @@ class BaseInvenTreeSetting(models.Model):
if self.is_bool():
value = self.as_bool()
if self.is_int():
value = self.as_int()
@ -643,6 +643,7 @@ class BaseInvenTreeSetting(models.Model):
def protected(self):
return self.__class__.is_protected(self.key)
def settings_group_options():
"""
Build up group tuple for settings based on your choices
@ -1066,7 +1067,7 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'default': True,
'validator': bool,
},
'SIGNUP_GROUP': {
'name': _('Group on signup'),
'description': _('Group to which new users are assigned on registration'),
@ -1121,7 +1122,7 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'validator': bool,
'requires_restart': True,
},
'ENABLE_PLUGINS_EVENTS': {
'name': _('Enable event integration'),
'description': _('Enable plugins to respond to internal events'),
@ -1203,7 +1204,7 @@ class InvenTreeUserSetting(BaseInvenTreeSetting):
'default': True,
'validator': bool,
},
'HOMEPAGE_STOCK_RECENT': {
'name': _('Show recent stock changes'),
'description': _('Show recently changed stock items on the homepage'),
@ -1385,7 +1386,7 @@ class InvenTreeUserSetting(BaseInvenTreeSetting):
'default': False,
'validator': bool,
},
'PART_SHOW_QUANTITY_IN_FORMS': {
'name': _('Show Quantity in Forms'),
'description': _('Display available part quantity in some forms'),
@ -1399,7 +1400,7 @@ class InvenTreeUserSetting(BaseInvenTreeSetting):
'default': False,
'validator': bool,
},
'STICKY_HEADER': {
'name': _('Fixed Navbar'),
'description': _('The navbar position is fixed to the top of the screen'),