Browse Source

Enumeration names

pull/131/head
Sebastian Stehle 9 years ago
parent
commit
83c8bfb857
  1. 7
      src/Squidex.Domain.Apps.Core/Schemas/StringField.cs

7
src/Squidex.Domain.Apps.Core/Schemas/StringField.cs

@ -66,7 +66,12 @@ namespace Squidex.Domain.Apps.Core.Schemas
if (Properties.AllowedValues != null)
{
jsonProperty.EnumerationNames = new Collection<string>(Properties.AllowedValues.ToList());
var names = jsonProperty.EnumerationNames = jsonProperty.EnumerationNames ?? new Collection<string>();
foreach (var value in Properties.AllowedValues)
{
names.Add(value);
}
}
}

Loading…
Cancel
Save