mypy: Correct get*notifications_stream to return Optional[Stream].

This commit is contained in:
neiljp (Neil Pilgrim) 2017-12-04 22:58:19 -08:00 committed by Greg Price
parent d01dcbd018
commit 451af39561
1 changed files with 2 additions and 2 deletions

View File

@ -244,12 +244,12 @@ class Realm(models.Model):
# Remove the port. Mainly needed for development environment.
return self.host.split(':')[0]
def get_notifications_stream(self) -> Optional['Realm']:
def get_notifications_stream(self) -> Optional['Stream']:
if self.notifications_stream is not None and not self.notifications_stream.deactivated:
return self.notifications_stream
return None
def get_signup_notifications_stream(self) -> Optional['Realm']:
def get_signup_notifications_stream(self) -> Optional['Stream']:
if self.signup_notifications_stream is not None and not self.signup_notifications_stream.deactivated:
return self.signup_notifications_stream
return None