Revert "Change if(realm.domain == mit.edu) to use Realm.is_zephyr_..."

This reverts commit 3645bb9225.

This change was incorrect, because the `is_zephyr_mirror_realm`
property on Realm is a property and thus isn't available in the
migration codebase.

Since this migration is only run for very old servers, this should
have no impact.
This commit is contained in:
Tim Abbott 2018-11-02 13:15:40 -07:00
parent c5b1406c54
commit e221a01638
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ def check_and_create_attachments(apps: StateApps,
is_message_realm_public = False is_message_realm_public = False
if message.recipient.type == STREAM: if message.recipient.type == STREAM:
stream = Stream.objects.get(id=message.recipient.type_id) stream = Stream.objects.get(id=message.recipient.type_id)
is_message_realm_public = not stream.invite_only and not stream.realm.is_zephyr_mirror_realm is_message_realm_public = not stream.invite_only and stream.realm.domain != "mit.edu"
if path_id is not None: if path_id is not None:
attachment = Attachment.objects.create( attachment = Attachment.objects.create(