From 33fca2b537d36cf998dd27425b2bb8ed5b0965f3 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 10 Nov 2021 13:13:16 +0800 Subject: Move webhook into models/webhook/ (#17579) --- services/auth/source/ldap/source_sync.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'services/auth/source') diff --git a/services/auth/source/ldap/source_sync.go b/services/auth/source/ldap/source_sync.go index 2df97aabd3..4508d1514a 100644 --- a/services/auth/source/ldap/source_sync.go +++ b/services/auth/source/ldap/source_sync.go @@ -11,6 +11,7 @@ import ( "strings" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" ) @@ -31,7 +32,7 @@ func (source *Source) Sync(ctx context.Context, updateExisting bool) error { select { case <-ctx.Done(): log.Warn("SyncExternalUsers: Cancelled before update of %s", source.loginSource.Name) - return models.ErrCancelledf("Before update of %s", source.loginSource.Name) + return db.ErrCancelledf("Before update of %s", source.loginSource.Name) default: } @@ -70,7 +71,7 @@ func (source *Source) Sync(ctx context.Context, updateExisting bool) error { log.Error("RewriteAllPublicKeys: %v", err) } } - return models.ErrCancelledf("During update of %s before completed update of users", source.loginSource.Name) + return db.ErrCancelledf("During update of %s before completed update of users", source.loginSource.Name) default: } if len(su.Username) == 0 { @@ -177,7 +178,7 @@ func (source *Source) Sync(ctx context.Context, updateExisting bool) error { select { case <-ctx.Done(): log.Warn("SyncExternalUsers: Cancelled during update of %s before delete users", source.loginSource.Name) - return models.ErrCancelledf("During update of %s before delete users", source.loginSource.Name) + return db.ErrCancelledf("During update of %s before delete users", source.loginSource.Name) default: } -- cgit v1.2.3