Skip to content

Commit 7f8df2e

Browse files
committed
Fix problem with the name-based URL for showing AD documents
introduced with the import-whole-names change - Legacy-Id: 3701
1 parent 610b56d commit 7f8df2e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

ietf/idrfc/views_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ def by_ad(request, name):
572572
role__group__type="area",
573573
role__group__state="active")
574574
| Q(pk__in=responsible)):
575-
if name == p.name.lower().replace(" ", "."):
575+
if name == p.full_name_as_key():
576576
ad_id = p.id
577577
ad_name = p.name
578578
break

redesign/person/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ def formatted_email(self):
5454
else:
5555
return ""
5656
def full_name_as_key(self):
57-
return self.name.lower().replace(" ", ".")
57+
# this is mostly a remnant from the old views, needed in the menu
58+
prefix, first, middle, last, suffix = name_parts(self.name)
59+
return (u"%s %s" % (first, last)).lower().replace(" ", ".")
5860
class Meta:
5961
abstract = True
6062

0 commit comments

Comments
 (0)