You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm guessing you don't actually have a "name" or "last_name" since you signed in with google. I sort of got round this in my application by having a display name too and never refer to full name directly since I always want to show something. @Property
def display_name(self):
if self.name or self.last_name:
return self.full_name
else:
return self.username
hope that helps,
I should really get round to sticking some of my updates onto my fork :)
Hello,
The first time I ran GAE Boilerplate, I clicked on login using your Google account and got a type error:
File "models.py", line 35, in <lambda> full_name = ndb.ComputedProperty(lambda self: self.name + " " + self.last_name) TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
I fixed this by changing line 35 in models.py to:
full_name = ndb.ComputedProperty(lambda self: "{} {}".format(self.name, self.last_name,))
I'm not sure if that's actually fixing the problem or just avoiding it.
Thanks
Richard
The text was updated successfully, but these errors were encountered: