diff options
-rw-r--r-- | models/auth/source.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/auth/source.go b/models/auth/source.go index b3f3262cc2..5f2781c808 100644 --- a/models/auth/source.go +++ b/models/auth/source.go @@ -234,7 +234,7 @@ func CreateSource(ctx context.Context, source *Source) error { err = registerableSource.RegisterSource() if err != nil { // remove the AuthSource in case of errors while registering configuration - if _, err := db.GetEngine(ctx).Delete(source); err != nil { + if _, err := db.GetEngine(ctx).ID(source.ID).Delete(new(Source)); err != nil { log.Error("CreateSource: Error while wrapOpenIDConnectInitializeError: %v", err) } } |