diff --git a/openstack_election/utils.py b/openstack_election/utils.py index 39cf3a35..79fa46e5 100644 --- a/openstack_election/utils.py +++ b/openstack_election/utils.py @@ -178,6 +178,9 @@ def get_irc(member, filepath=None): member_data = member.get('data', []) if member_data: irc = member_data[0].get('irc', '') + # The API can return None for nonexistent nicks + if irc is None: + irc = '' return irc