diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 0a5e87e3fa..3302d06eb1 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -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 }, }