mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
populate_billing_realms: Delete existing remote realms.
Running script multiple times created multiple `RemoteRealm` objects resulting in processing error.
This commit is contained in:
@@ -461,6 +461,10 @@ def populate_remote_server(customer_profile: CustomerProfile) -> Dict[str, str]:
|
||||
|
||||
|
||||
def populate_remote_realms(customer_profile: CustomerProfile) -> Dict[str, str]:
|
||||
# Delete existing remote realm.
|
||||
RemoteRealm.objects.filter(name=customer_profile.unique_id).delete()
|
||||
flush_cache(None)
|
||||
|
||||
local_realm = populate_realm(customer_profile)
|
||||
assert local_realm is not None
|
||||
|
||||
|
Reference in New Issue
Block a user