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.
This commit is contained in:
Mateusz Mandera 2023-06-03 00:26:37 +02:00 committed by Alex Vandiver
parent f3684e842a
commit a55901aa67
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ def get_fake_email_domain(apps: StateApps, realm_id: int) -> str:
# Implement get_fake_email_domain # Implement get_fake_email_domain
try: try:
validate_email(Address(username="bot", domain=host).addr_spec) validate_email(Address(username="bot", domain=host).addr_spec)
return realm.host return host
except ValidationError: except ValidationError:
pass pass