Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
populate_billing_realms: Add temporary fix for MissingDataError.
Aman Agrawala1fa969693f9
diff --git a/zilencer/management/commands/populate_billing_realms.py b/zilencer/management/commands/populate_billing_realms.pyindex 3de71b11e69..4a116980337 100644--- a/zilencer/management/commands/populate_billing_realms.py+++ b/zilencer/management/commands/populate_billing_realms.py@@ -410,6 +410,8 @@ def populate_remote_server(customer_profile: CustomerProfile) -> Dict[str, str]:hostname=f"{unique_id}.example.com",contact_email=f"{unique_id}@example.com",plan_type=plan_type,+ # TODO: Save property audit log data for server.+ last_audit_log_update=timezone_now(),)billing_session = RemoteServerBillingSession(remote_server)@@ -483,6 +485,9 @@ def populate_remote_realms(customer_profile: CustomerProfile) -> Dict[str, str]:remote_realm = RemoteRealm.objects.get(uuid=local_realm.uuid)billing_session = RemoteRealmBillingSession(remote_realm)+ # TODO: Save property audit log data for server.+ remote_realm.server.last_audit_log_update = timezone_now()+ remote_realm.server.save(update_fields=["last_audit_log_update"])customer = billing_session.update_or_create_stripe_customer()assert customer.stripe_customer_id is not Noneadd_card_to_customer(customer)