Skip to content

Commit 54c9fc7

Browse files
committed
Trying to fix the tag issue.
1 parent fb442cd commit 54c9fc7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

eFormAPI/eFormAPI/Controllers/TemplatesController.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ public OperationResult Create(EFormXmlModel eFormXmlModel)
156156
if (newTemplate == null) throw new Exception("eForm could not be created!");
157157
// Set tags to eform
158158
core.TemplateCreate(newTemplate);
159-
core.TemplateSetTags(newTemplate.Id, eFormXmlModel.TagIds);
159+
if (eFormXmlModel.TagIds != null)
160+
{
161+
core.TemplateSetTags(newTemplate.Id, eFormXmlModel.TagIds);
162+
}
160163
return new OperationResult(true, $"eForm \"{newTemplate.Label}\" created successfully");
161164
}
162165
catch (Exception e)

0 commit comments

Comments
 (0)