2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

Adds support for "multiple choice" field

This commit is contained in:
Oliver
2021-11-09 22:25:42 +11:00
parent 721d10a9ec
commit 8d7b73e2a8
2 changed files with 14 additions and 2 deletions

View File

@ -32,7 +32,15 @@ class SettingsSerializer(InvenTreeModelSerializer):
Returns the choices available for a given item
"""
return obj.choices()
results = []
for choice in obj.choices():
results.append({
'value': choice[0],
'display_name': choice[1],
})
return results
class GlobalSettingsSerializer(SettingsSerializer):