From 1689e534ca22b26ed0bc286276bdd8e29d67b230 Mon Sep 17 00:00:00 2001 From: Lennard de Rijk Date: Thu, 26 Mar 2009 14:11:06 +0000 Subject: [PATCH] Added document_name alias for use on award certificates. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed --- app/soc/models/role.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/soc/models/role.py b/app/soc/models/role.py index 38f22fcf..d5606d0e 100644 --- a/app/soc/models/role.py +++ b/app/soc/models/role.py @@ -352,3 +352,11 @@ class Role(soc.models.linkable.Linkable): """Property as 'name' for use in common templates. """ return '%s %s' %(self.given_name, self.surname) + + def document_name(self): + """Property as 'document_name' used on for example award certificates. + """ + if self.name_on_documents: + return self.name_on_documents + else: + return self.name() -- 2.11.4.GIT