zilencer: Use early return pattern for readability.

This commit is contained in:
Tim Abbott 2024-02-21 10:45:43 -08:00
parent ea863bab5b
commit bd0b5d80ba
1 changed files with 60 additions and 58 deletions

View File

@ -967,7 +967,9 @@ def handle_customer_migration_from_server_to_realm(
event_time = timezone_now()
remote_realm_audit_logs = []
if len(realm_uuids) == 1:
if len(realm_uuids) != 1:
return
# Here, we have exactly one non-system-bot realm, and some
# sort of plan on the server; move it to the realm.
remote_realm = RemoteRealm.objects.get(uuid=realm_uuids[0], server=server)