Skip to content

Commit b7f2f41

Browse files
authored
Merge pull request #87 from Gid733/master
Empty entity-select/search fix
2 parents fd09f2b + 45ca218 commit b7f2f41

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

eFormAPI/eFormAPI/Infrastructure/Helpers/CaseUpdateHelper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,16 @@ public static List<string> GetFieldValuesByRequestField(CaseEditRequestField edi
9292
}
9393
break;
9494
case "SingleSelect":
95-
var singleFirst = editRequestField?.FieldValues?.First();
96-
if (singleFirst?.Value != null && singleFirst?.FieldId != null)
95+
var singleSelect = editRequestField?.FieldValues?.First();
96+
if (singleSelect?.Value != null && singleSelect?.Value != "0" && singleSelect?.FieldId != null)
9797
{
98-
string val = $"{singleFirst.FieldId}|{singleFirst.Value.ToString()}";
98+
string val = $"{singleSelect.FieldId}|{singleSelect.Value.ToString()}";
9999
list.Add(val);
100100
}
101101
break;
102102
case "EntitySearch":
103103
var entitySearch = editRequestField?.FieldValues?.First();
104-
if (entitySearch?.Value != null && entitySearch?.FieldId != null)
104+
if (entitySearch?.Value != null && entitySearch?.Value != "0" && entitySearch?.FieldId != null)
105105
{
106106
string val = $"{entitySearch.FieldId}|{entitySearch.Value.ToString()}";
107107
list.Add(val);

0 commit comments

Comments
 (0)