Mercurial > libervia-backend
changeset 2467:908be289eb49
plugin identity: if we get an empty avatar, don't feel avatar_basename and remove avatar key.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 05 Jan 2018 12:58:54 +0100 (2018-01-05) |
parents | d2e16a7466a0 |
children | 8f14c1865e9e |
files | src/plugins/plugin_misc_identity.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/plugin_misc_identity.py Wed Jan 03 00:29:18 2018 +0100 +++ b/src/plugins/plugin_misc_identity.py Fri Jan 05 12:58:54 2018 +0100 @@ -83,7 +83,10 @@ except exceptions.NotFound: pass else: - id_data[u'avatar_basename'] = os.path.basename(avatar_path) + if avatar_path: + id_data[u'avatar_basename'] = os.path.basename(avatar_path) + else: + del id_data[u'avatar'] defer.returnValue(id_data)