mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
clearer name and PEP foxes
This commit is contained in:
parent
f478a6236f
commit
0657b71fe8
@ -475,9 +475,12 @@ class BaseInvenTreeSetting(models.Model):
|
|||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def group_options():
|
|
||||||
|
def settings_group_options():
|
||||||
|
"""build up group tuple for settings based on gour choices"""
|
||||||
return [('', _('No group')), *[(str(a.id), str(a)) for a in Group.objects.all()]]
|
return [('', _('No group')), *[(str(a.id), str(a)) for a in Group.objects.all()]]
|
||||||
|
|
||||||
|
|
||||||
class InvenTreeSetting(BaseInvenTreeSetting):
|
class InvenTreeSetting(BaseInvenTreeSetting):
|
||||||
"""
|
"""
|
||||||
An InvenTreeSetting object is a key:value pair used for storing
|
An InvenTreeSetting object is a key:value pair used for storing
|
||||||
@ -848,7 +851,7 @@ class InvenTreeSetting(BaseInvenTreeSetting):
|
|||||||
'name': _('Group on signup'),
|
'name': _('Group on signup'),
|
||||||
'description': _('Group new user are asigned on registration'),
|
'description': _('Group new user are asigned on registration'),
|
||||||
'default': '',
|
'default': '',
|
||||||
'choices': group_options
|
'choices': settings_group_options
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user