Skip to content

Commit 7da5e73

Browse files
committed
add OrgQuotaUpdateOut, don't include subEventId for now
1 parent a40740a commit 7da5e73

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

backend/btrixcloud/models.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2124,6 +2124,14 @@ class OrgQuotaUpdate(BaseModel):
21242124
subEventId: str | None = None
21252125

21262126

2127+
# ============================================================================
2128+
class OrgQuotaUpdateOut(BaseModel):
2129+
"""Organization quota update output for admins"""
2130+
2131+
modified: datetime
2132+
update: OrgQuotas
2133+
2134+
21272135
# ============================================================================
21282136
class OrgReadOnlyUpdate(BaseModel):
21292137
"""Organization readonly update"""
@@ -2198,7 +2206,7 @@ class OrgOut(BaseMongoModel):
21982206
giftedExecSecondsAvailable: int = 0
21992207

22002208
quotas: OrgQuotas = OrgQuotas()
2201-
quotaUpdates: Optional[List[OrgQuotaUpdate]] = []
2209+
quotaUpdates: Optional[List[OrgQuotaUpdateOut]] = []
22022210

22032211
webhookUrls: Optional[OrgWebhookUrls] = OrgWebhookUrls()
22042212

backend/test/test_org_subs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ def test_subscription_add_minutes(admin_auth_headers):
960960
quota_updates = r.json()["quotaUpdates"]
961961
assert len(quota_updates)
962962
last_update = quota_updates[-1]
963-
assert last_update["subEventId"]
963+
assert "subEventId" not in last_update
964964
assert last_update["update"] == {
965965
"maxPagesPerCrawl": 100,
966966
"storageQuota": 1000000,

0 commit comments

Comments
 (0)