mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-03 13:58:47 +00:00
Catch for null value for settings choices
This commit is contained in:
parent
8d7b73e2a8
commit
e303b5a39b
@ -34,7 +34,10 @@ class SettingsSerializer(InvenTreeModelSerializer):
|
|||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
for choice in obj.choices():
|
choices = obj.choices()
|
||||||
|
|
||||||
|
if choices:
|
||||||
|
for choice in choices:
|
||||||
results.append({
|
results.append({
|
||||||
'value': choice[0],
|
'value': choice[0],
|
||||||
'display_name': choice[1],
|
'display_name': choice[1],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user