diff --git a/web/src/pages/sources/oauth/OAuthSourceForm.ts b/web/src/pages/sources/oauth/OAuthSourceForm.ts index d7ece0fb6..135c999d4 100644 --- a/web/src/pages/sources/oauth/OAuthSourceForm.ts +++ b/web/src/pages/sources/oauth/OAuthSourceForm.ts @@ -199,8 +199,10 @@ export class OAuthSourceForm extends ModelForm { ${until(new SourcesApi(DEFAULT_CONFIG).sourcesOauthSourceTypesList().then(types => { return types.map(type => { let selected = this.instance?.providerType === type.slug; + const modelSlug = this.modelName?.replace("oauthsource", "").replace("-", ""); + const typeSlug = type.slug.replace("-", ""); if (!this.instance?.pk) { - if (this.modelName?.replace("oauthsource", "") === type.slug) { + if (modelSlug === typeSlug) { selected = true; } }