From 83c8bfb85714e0d65ffc2b7781f7c322fb1bb5e1 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Wed, 4 Oct 2017 01:14:15 +0200 Subject: [PATCH] Enumeration names --- src/Squidex.Domain.Apps.Core/Schemas/StringField.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Squidex.Domain.Apps.Core/Schemas/StringField.cs b/src/Squidex.Domain.Apps.Core/Schemas/StringField.cs index 904d0618d..f9715607c 100644 --- a/src/Squidex.Domain.Apps.Core/Schemas/StringField.cs +++ b/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(Properties.AllowedValues.ToList()); + var names = jsonProperty.EnumerationNames = jsonProperty.EnumerationNames ?? new Collection(); + + foreach (var value in Properties.AllowedValues) + { + names.Add(value); + } } }