summaryrefslogtreecommitdiffstats
path: root/app/views/custom_fields
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/custom_fields')
-rw-r--r--app/views/custom_fields/index.api.rsb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/custom_fields/index.api.rsb b/app/views/custom_fields/index.api.rsb
index e640f3315..4dbd44c7a 100644
--- a/app/views/custom_fields/index.api.rsb
+++ b/app/views/custom_fields/index.api.rsb
@@ -15,11 +15,12 @@ api.array :custom_fields do
api.default_value field.default_value
api.visible field.visible?
- if field.field_format == 'list'
+ values = field.possible_values_options
+ if values.present?
api.array :possible_values do
- field.possible_values.each do |v|
+ values.each do |label, value|
api.possible_value do
- api.value v
+ api.value value || label
end
end
end