From a73c2c681233713cccbeeb31affda5d2ae9b2b9a Mon Sep 17 00:00:00 2001 From: JakobDev Date: Wed, 20 Nov 2024 11:00:32 +0100 Subject: [PATCH] Fix build --- routers/api/v1/org/org.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go index 92e4c66b4d..b278281c35 100644 --- a/routers/api/v1/org/org.go +++ b/routers/api/v1/org/org.go @@ -15,6 +15,7 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/optional" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/validation" "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/user" "code.gitea.io/gitea/routers/api/v1/utils" @@ -355,7 +356,7 @@ func Edit(ctx *context.APIContext) { ctx.Org.Organization.Email = "" } else { if err := user_service.ReplacePrimaryEmailAddress(ctx, ctx.Org.Organization.AsUser(), *form.Email); err != nil { - if user_model.IsErrEmailInvalid(err) || user_model.IsErrEmailCharIsNotSupported(err) { + if validation.IsErrEmailInvalid(err) || validation.IsErrEmailCharIsNotSupported(err) { ctx.Error(http.StatusUnprocessableEntity, "ReplacePrimaryEmailAddress", err) } else { ctx.Error(http.StatusInternalServerError, "ReplacePrimaryEmailAddress", err)