comparison src/server/blog.py @ 887:dd2273617eb7

server (blog): fixes displaying default avatar
author souliane <souliane@mailoo.org>
date Fri, 11 Mar 2016 10:18:59 +0100
parents fe4d8dfaaa65
children 2b091322c6cb
comparison
equal deleted inserted replaced
886:fe4d8dfaaa65 887:dd2273617eb7
130 """ 130 """
131 if key != "avatar": 131 if key != "avatar":
132 return 132 return
133 log.debug(_(u"Received a new avatar for entity %s") % entity_s) 133 log.debug(_(u"Received a new avatar for entity %s") % entity_s)
134 134
135 url = os.path.join(C.AVATARS_DIR, value) 135 url = os.path.join(C.AVATARS_DIR, value) if value else ""
136 self.avatars_cache[entity_s] = url 136 self.avatars_cache[entity_s] = url
137 try: 137 try:
138 self.waiting_deferreds.pop(entity_s).callback(url) 138 self.waiting_deferreds.pop(entity_s).callback(url)
139 except KeyError: 139 except KeyError:
140 pass 140 pass