Skip to content

Commit cc92877

Browse files
asottile-sentryiamrajjoshi
authored andcommitted
ref: avoid setting scope_list=None in SentryApp creation (#91484)
when switching to django's ArrayField it helpfully points out that this doesn't make sense as null <!-- Describe your PR here. -->
1 parent 25d1411 commit cc92877

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sentry/sentry_apps/logic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ def _create_sentry_app(
367367
"application_id": api_app.id,
368368
"owner_id": self.organization_id,
369369
"proxy_user_id": proxy.id,
370-
"scope_list": self.scopes,
371370
"events": expand_events(self.events),
372371
"schema": self.schema or {},
373372
"webhook_url": self.webhook_url,
@@ -381,6 +380,8 @@ def _create_sentry_app(
381380
or user.username, # email is not required for some users (sentry apps)
382381
"metadata": self.metadata if self.metadata else {},
383382
}
383+
if self.scopes is not None:
384+
kwargs["scope_list"] = self.scopes
384385

385386
if self.is_internal:
386387
kwargs["status"] = SentryAppStatus.INTERNAL

0 commit comments

Comments
 (0)