web/admin: fix oauth source not creatable

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-06-01 23:36:21 +02:00
parent 85d349e776
commit 770316a49f
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ export class OAuthSourceForm extends ModelForm<OAuthSource, string> {
}
send = (data: OAuthSource): Promise<OAuthSource> => {
if (this.instance) {
if (this.instance?.slug) {
return new SourcesApi(DEFAULT_CONFIG).sourcesOauthPartialUpdate({
slug: this.instance.slug,
patchedOAuthSourceRequest: data