aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api/v1/org/org.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/api/v1/org/org.go')
-rw-r--r--internal/route/api/v1/org/org.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/route/api/v1/org/org.go b/internal/route/api/v1/org/org.go
index 0bcefbe4..94c3f6a2 100644
--- a/internal/route/api/v1/org/org.go
+++ b/internal/route/api/v1/org/org.go
@@ -31,8 +31,7 @@ func CreateOrgForUser(c *context.APIContext, apiForm api.CreateOrgOption, user *
}
if err := db.CreateOrganization(org, user); err != nil {
if db.IsErrUserAlreadyExist(err) ||
- db.IsErrNameReserved(err) ||
- db.IsErrNamePatternNotAllowed(err) {
+ db.IsErrNameNotAllowed(err) {
c.ErrorStatus(http.StatusUnprocessableEntity, err)
} else {
c.Error(err, "create organization")