backend: test for exact DisplayName match #350
@@ -567,8 +567,12 @@ func (svc *Service) ActionSubmissionTriggerSubmit(ctx context.Context, params ap
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(maps_list) != 0 {
|
||||
return ErrDisplayNameNotUnique
|
||||
|
||||
// The map search finds substrings, we only want exact matches
|
||||
for _, m := range maps_list {
|
||||
if m.DisplayName == submission.DisplayName {
|
||||
return ErrDisplayNameNotUnique
|
||||
}
|
||||
}
|
||||
|
||||
// transaction
|
||||
|
||||
Reference in New Issue
Block a user