feat(assessment): assign the demonstration category and keep result history
This commit is contained in:
1 parent
b3c6dc870b
commit
8277133712
61 files changed
+4338
-268
No files matched your search
@@ -57,7 +57,8 @@ func validInboxText(value string, maxRunes int, allowNewlines bool) bool {
|
||||
return false
|
||||
}
|
||||
for _, character := range value {
|
||||
if character == 0 || (character < 0x20 && !(allowNewlines && (character == '\n' || character == '\t'))) || character == 0x7f {
|
||||
allowedControl := allowNewlines && (character == '\n' || character == '\t')
|
||||
if character == 0 || (character < 0x20 && !allowedControl) || character == 0x7f {
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -173,11 +174,12 @@ func (service *InboxService) List(ctx context.Context, request InboxListRequest)
|
||||
}
|
||||
item := InboxItem{Entry: entry}
|
||||
content, resolveErr := service.resolver.Resolve(ctx, entry)
|
||||
if errors.Is(resolveErr, ErrInboxContentUnavailable) {
|
||||
switch {
|
||||
case errors.Is(resolveErr, ErrInboxContentUnavailable):
|
||||
item.ContentUnavailable = true
|
||||
} else if resolveErr != nil {
|
||||
case resolveErr != nil:
|
||||
return InboxPage{}, fmt.Errorf("%s - resolve current event content: %w", location, resolveErr)
|
||||
} else {
|
||||
default:
|
||||
item.Content = &content
|
||||
}
|
||||
page.Items = append(page.Items, item)
|
||||
|
||||
Reference in new issue
Block a user