# HG changeset patch # User Goffi # Date 1515153534 -3600 # Node ID 908be289eb49b37aba0a75bd9a07590cbe6385b7 # Parent d2e16a7466a03e9393e1e1352cb31f323fe1c6c7 plugin identity: if we get an empty avatar, don't feel avatar_basename and remove avatar key. diff -r d2e16a7466a0 -r 908be289eb49 src/plugins/plugin_misc_identity.py --- 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)