Add length limit to summary fields
This commit is contained in:
parent
78c111be54
commit
af319b18b7
1 changed files with 8 additions and 1 deletions
|
@ -208,10 +208,17 @@ public class InterviewStep
|
|||
if (!string.IsNullOrWhiteSpace(summaryField) && !string.IsNullOrWhiteSpace(answer))
|
||||
{
|
||||
if (answerDelimiter != null && summary.Contains(summaryField))
|
||||
{
|
||||
if ((summary[summaryField] + answerDelimiter + answer).Length < 1024)
|
||||
{
|
||||
summary[summaryField] += answerDelimiter + answer;
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Error("Tried to add answer '" + answer + "' to summary field '" + summaryField + "' but it was too long.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
summary[summaryField] = answer;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue