[MERGE] Don't crash if user's full name is unset
Toshio Kuratomi
a.badger at gmail.com
Tue Apr 20 16:33:18 UTC 2010
On Tue, Apr 20, 2010 at 10:22:17AM -0400, Stephen Gallagher wrote:
> === modified file 'fedora/django/auth/models.py'
> --- fedora/django/auth/models.py 2010-04-19 20:56:48 +0000
> +++ fedora/django/auth/models.py 2010-04-20 14:19:07 +0000
> @@ -122,4 +122,6 @@
> objects = FasUserManager()
>
> def get_full_name(self):
> - return self.name.strip()
> + if self.name:
> + return self.name.strip()
> + return self.username.strip()
>
Would we rather return username or empty string (u"") in case of error?
-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20100420/baccc068/attachment.bin
More information about the infrastructure
mailing list