We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 710e4b7 commit 856ef6eCopy full SHA for 856ef6e
backend/btrixcloud/orgs.py
@@ -632,20 +632,17 @@ async def update_quotas(
632
exclude_unset=True, exclude_defaults=True, exclude_none=True
633
)
634
635
- quota_updates = []
636
- for prev_update in org.quotaUpdates or []:
637
- quota_updates.append(prev_update.dict())
638
- quota_updates.append(
639
- OrgQuotaUpdate(update=update, modified=dt_now(), context=context).dict()
640
- )
641
-
642
await self.orgs.find_one_and_update(
643
{"_id": org.id},
644
{
645
"$set": {
646
"quotas": update,
647
- "quotaUpdates": quota_updates,
648
- }
+ },
+ "$push": {
+ "quotaUpdates": OrgQuotaUpdate(
+ update=OrgQuotas(**update), modified=dt_now(), context=context
+ ).model_dump()
649
},
650
651
0 commit comments