Fix problem with the name-based URL for showing AD documents
introduced with the import-whole-names change - Legacy-Id: 3701
This commit is contained in:
parent
610b56dfd0
commit
7f8df2edf1
|
@ -572,7 +572,7 @@ def by_ad(request, name):
|
|||
role__group__type="area",
|
||||
role__group__state="active")
|
||||
| Q(pk__in=responsible)):
|
||||
if name == p.name.lower().replace(" ", "."):
|
||||
if name == p.full_name_as_key():
|
||||
ad_id = p.id
|
||||
ad_name = p.name
|
||||
break
|
||||
|
|
|
@ -54,7 +54,9 @@ class PersonInfo(models.Model):
|
|||
else:
|
||||
return ""
|
||||
def full_name_as_key(self):
|
||||
return self.name.lower().replace(" ", ".")
|
||||
# this is mostly a remnant from the old views, needed in the menu
|
||||
prefix, first, middle, last, suffix = name_parts(self.name)
|
||||
return (u"%s %s" % (first, last)).lower().replace(" ", ".")
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue