backend: test for exact DisplayName match
- The ListMaps method is unexpectedly finding DisplayName substrings
This commit was merged in pull request #350.
This commit is contained in:
@@ -567,8 +567,12 @@ func (svc *Service) ActionSubmissionTriggerSubmit(ctx context.Context, params ap
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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
|
// transaction
|
||||||
|
|||||||
Reference in New Issue
Block a user