Re: [MERGE] Don't crash if user's full name is unset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: pgpTi93jT6lGl.pgp
Description: PGP signature

_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux