subject_links: Remove useless RealmFilter.DoesNotExist case.

This commit is contained in:
Tim Abbott 2016-05-31 19:46:42 -07:00
parent 68fba3579d
commit e89730dc8f
1 changed files with 6 additions and 9 deletions

View File

@ -1025,7 +1025,6 @@ def subject_links(domain, subject):
from zerver.models import get_realm, RealmFilter, realm_filters_for_domain
matches = [] # type: List[text_type]
try:
realm_filters = realm_filters_for_domain(domain)
for realm_filter in realm_filters:
@ -1033,8 +1032,6 @@ def subject_links(domain, subject):
for m in re.finditer(pattern, subject):
matches += [realm_filter[1] % m.groupdict()]
return matches
except RealmFilter.DoesNotExist:
return matches
def make_realm_filters(domain, filters):
global md_engines, realm_filter_data