clearer name and PEP foxes

This commit is contained in:
Matthias 2021-10-14 22:19:52 +02:00
parent f478a6236f
commit 0657b71fe8
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -475,9 +475,12 @@ class BaseInvenTreeSetting(models.Model):
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()]]
class InvenTreeSetting(BaseInvenTreeSetting):
"""
An InvenTreeSetting object is a key:value pair used for storing
@ -848,7 +851,7 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'name': _('Group on signup'),
'description': _('Group new user are asigned on registration'),
'default': '',
'choices': group_options
'choices': settings_group_options
},
}