Handle when user has never logged into the system.
This commit is contained in:
parent
4b5c62a7c6
commit
cb418475cf
|
@ -2,7 +2,7 @@
|
|||
Package metadata definition.
|
||||
"""
|
||||
|
||||
VERSION = (0, 2, 0, 'alpha', 0)
|
||||
VERSION = (0, 2, 0, 'alpha', 1)
|
||||
|
||||
|
||||
def get_version():
|
||||
|
|
|
@ -120,8 +120,9 @@ class UserAccount(OrchestraModel):
|
|||
if 'language' in data:
|
||||
language = data['language'].lower()
|
||||
|
||||
if 'last_login' in data:
|
||||
last_login = parse_datetime(data['last_login'])
|
||||
last_login = data.get('last_login')
|
||||
if last_login is not None:
|
||||
last_login = parse_datetime(last_login)
|
||||
|
||||
return super().new_from_json(data=data, billing=billing, language=language, last_login=last_login)
|
||||
|
||||
|
|
Loading…
Reference in New Issue