From a55901aa6789cadc24b129a62f47493a5e9bcbef Mon Sep 17 00:00:00 2001 From: Mateusz Mandera Date: Sat, 3 Jun 2023 00:26:37 +0200 Subject: [PATCH] migrations: Fix bug in migration 0439. This code clearly meant to return host and returning realm.host is a mistake. realm.host is not accessible in a migration due to being a @property-decorated method. The code constructs the host var value just above this line. --- zerver/migrations/0439_fix_deleteduser_email.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/migrations/0439_fix_deleteduser_email.py b/zerver/migrations/0439_fix_deleteduser_email.py index 08166c4b7b..b979271464 100644 --- a/zerver/migrations/0439_fix_deleteduser_email.py +++ b/zerver/migrations/0439_fix_deleteduser_email.py @@ -28,7 +28,7 @@ def get_fake_email_domain(apps: StateApps, realm_id: int) -> str: # Implement get_fake_email_domain try: validate_email(Address(username="bot", domain=host).addr_spec) - return realm.host + return host except ValidationError: pass