From c7350be50f77ff625c9e0cb9ec79093703a02490 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 26 Apr 2018 11:53:51 +0000 Subject: [PATCH] Reverted a change to UserFactory to avoid nepalese names. The issue is bigger, and needs a different resulution. Changed the url pattern that used \w to match names to instead use a more inclusive regex. - Legacy-Id: 15088 --- ietf/doc/urls.py | 2 +- ietf/person/factories.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ietf/doc/urls.py b/ietf/doc/urls.py index 24df5944a..62f97a7fa 100644 --- a/ietf/doc/urls.py +++ b/ietf/doc/urls.py @@ -47,7 +47,7 @@ urlpatterns = [ url(r'^$', views_search.search), url(r'^search/?$', views_search.search), url(r'^in-last-call/?$', views_search.drafts_in_last_call), - url(r'^ad/(?P[\w.-]+)/$(?u)', views_search.docs_for_ad), + url(r'^ad/(?P[^/]+)/?$(?u)', views_search.docs_for_ad), url(r'^ad2/(?P[\w.-]+)/$(?u)', RedirectView.as_view(url='/doc/ad/%(name)s/', permanent=True)), url(r'^rfc-status-changes/?$', views_status_change.rfc_status_changes), url(r'^start-rfc-status-change/(?:%(name)s/)?$' % settings.URL_REGEXPS, views_status_change.start_rfc_status_change), diff --git a/ietf/person/factories.py b/ietf/person/factories.py index 3b2af33b9..a9c02c5fb 100644 --- a/ietf/person/factories.py +++ b/ietf/person/factories.py @@ -24,11 +24,7 @@ def random_faker(): # extraction code, and also don't seem to match the way people with arabic # names romanize arabic names. Exlude those locales from name generation # in order to avoid test failures. - # 25 Apr 2018: Also exclude nepalese. Nepalese names can contain - # non-spacing marks, which don't match \w; thus there are names that - # won't match ^\w+$, which is problematic in some url patterns meant to - # match names. - locales = set( [ l for l in faker.config.AVAILABLE_LOCALES if not (l.startswith('ar_') or l.startswith('sg_') or l.startswith('ne_')) ] ) + locales = set( [ l for l in faker.config.AVAILABLE_LOCALES if not (l.startswith('ar_') or l.startswith('sg_')) ] ) return faker.Faker(random.sample(locales, 1)[0]) class UserFactory(factory.DjangoModelFactory):