From de002641cbf82b55ff350c1b6ae836a0591c30b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Rodrigo?= Date: Wed, 12 Jan 2022 22:35:26 +0100 Subject: [PATCH] Fix on case when name is None --- addok_usage_name_BAN_FR/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addok_usage_name_BAN_FR/utils.py b/addok_usage_name_BAN_FR/utils.py index 46b5302..9ed9358 100644 --- a/addok_usage_name_BAN_FR/utils.py +++ b/addok_usage_name_BAN_FR/utils.py @@ -5,7 +5,7 @@ # Adelans-et-le-Val-de-Bithaine -> Adelans-et-le-Val-de-Bithaine, adelans-et-le-val, adelans # Return full name first def subpart_generator(name): - if '-' not in name: + if not name or '-' not in name: return (name,) s = name.lower().replace('\'', ' ').split('-')