Skip to content

Commit dc58f1e

Browse files
committed
fix typing issues
1 parent e65a786 commit dc58f1e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/sentry/api/serializers/models/organization.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ class DetailedOrganizationSerializerResponse(_DetailedOrganizationSerializerResp
558558
enableSeerEnhancedAlerts: bool
559559
enableSeerCoding: bool
560560
autoOpenPrs: bool
561+
hasGranularReplayPermissions: bool
561562
replayAccessMembers: list[int]
562563

563564

@@ -726,11 +727,11 @@ def serialize( # type: ignore[override]
726727
team__organization=obj
727728
).count(),
728729
"isDynamicallySampled": is_dynamically_sampled,
730+
"hasGranularReplayPermissions": False,
731+
"replayAccessMembers": [],
729732
}
730733

731734
if features.has("organizations:granular-replay-permissions", obj):
732-
# The organization option can be missing, False, or null.
733-
# Only set hasGranularReplayPermissions to True if the option exists and is truthy.
734735
permissions_enabled = (
735736
OrganizationOption.objects.filter(
736737
organization=obj, key="sentry:granular-replay-permissions"
@@ -744,9 +745,6 @@ def serialize( # type: ignore[override]
744745
"organizationmember_id", flat=True
745746
)
746747
)
747-
else:
748-
context["hasGranularReplayPermissions"] = False
749-
context["replayAccessMembers"] = []
750748

751749
if has_custom_dynamic_sampling(obj, actor=user):
752750
context["targetSampleRate"] = float(

tests/sentry/core/endpoints/test_organization_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,7 @@ def test_replay_access_members_clear_all(self) -> None:
16371637
with assume_test_silo_mode_of(AuditLogEntry):
16381638
AuditLogEntry.objects.filter(organization_id=self.organization.id).delete()
16391639

1640-
data = {"replayAccessMembers": []}
1640+
data: dict[str, Any] = {"replayAccessMembers": []}
16411641
with outbox_runner():
16421642
self.get_success_response(self.organization.slug, **data)
16431643

0 commit comments

Comments
 (0)