From 060e0917bc2b38bf5b4b42119510cecee7a932f1 Mon Sep 17 00:00:00 2001 From: Khanh Ngo Date: Mon, 9 Apr 2018 18:50:55 +0700 Subject: [PATCH] Fix #236 --- app/lib/utils.py | 3 +++ docker-compose.dev.yml | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/lib/utils.py b/app/lib/utils.py index 84c4a752a..5ec86444c 100644 --- a/app/lib/utils.py +++ b/app/lib/utils.py @@ -196,6 +196,9 @@ def email_to_gravatar_url(email="", size=100): """ AD doesn't necessarily have email """ + if email is None: + email = "" + hash_string = hashlib.md5(email.encode('utf-8')).hexdigest() return "https://s.gravatar.com/avatar/{0}?s={1}".format(hash_string, size) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 57b1e1614..5f283c2a6 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -9,7 +9,6 @@ services: container_name: powerdns-admin mem_limit: 256M memswap_limit: 256M - tty: true command: /usr/bin/supervisord -c /etc/supervisord.conf ports: - "9191:9191"