Skip to content

Commit c7350be

Browse files
committed
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
1 parent fec59ad commit c7350be

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

ietf/doc/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
url(r'^$', views_search.search),
4848
url(r'^search/?$', views_search.search),
4949
url(r'^in-last-call/?$', views_search.drafts_in_last_call),
50-
url(r'^ad/(?P<name>[\w.-]+)/$(?u)', views_search.docs_for_ad),
50+
url(r'^ad/(?P<name>[^/]+)/?$(?u)', views_search.docs_for_ad),
5151
url(r'^ad2/(?P<name>[\w.-]+)/$(?u)', RedirectView.as_view(url='/doc/ad/%(name)s/', permanent=True)),
5252
url(r'^rfc-status-changes/?$', views_status_change.rfc_status_changes),
5353
url(r'^start-rfc-status-change/(?:%(name)s/)?$' % settings.URL_REGEXPS, views_status_change.start_rfc_status_change),

ietf/person/factories.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ def random_faker():
2424
# extraction code, and also don't seem to match the way people with arabic
2525
# names romanize arabic names. Exlude those locales from name generation
2626
# in order to avoid test failures.
27-
# 25 Apr 2018: Also exclude nepalese. Nepalese names can contain
28-
# non-spacing marks, which don't match \w; thus there are names that
29-
# won't match ^\w+$, which is problematic in some url patterns meant to
30-
# match names.
31-
locales = set( [ l for l in faker.config.AVAILABLE_LOCALES if not (l.startswith('ar_') or l.startswith('sg_') or l.startswith('ne_')) ] )
27+
locales = set( [ l for l in faker.config.AVAILABLE_LOCALES if not (l.startswith('ar_') or l.startswith('sg_')) ] )
3228
return faker.Faker(random.sample(locales, 1)[0])
3329

3430
class UserFactory(factory.DjangoModelFactory):

0 commit comments

Comments
 (0)