From 1d57041e775a05da0a2e9bd7964a20a95f662285 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Thu, 26 Mar 2020 11:11:54 +0100 Subject: [PATCH 2/3] profile: set kind on phone number attributes (#41034) --- hobo/profile/migrations/0002_add_data.py | 4 ++-- tests_authentic/test_hobo_deploy.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hobo/profile/migrations/0002_add_data.py b/hobo/profile/migrations/0002_add_data.py index a277503..d209998 100644 --- a/hobo/profile/migrations/0002_add_data.py +++ b/hobo/profile/migrations/0002_add_data.py @@ -19,8 +19,8 @@ def add_initial_data(apps, schema_editor): {'label': u'Commune', 'name': 'city'}, {'label': u'Pays', 'name': 'country', 'disabled': True}, {'label': u'Date de naissance', 'name': 'birthdate', 'kind': 'birthdate', 'disabled': True}, - {'label': u'Téléphone', 'name': 'phone'}, - {'label': u'Mobile', 'name': 'mobile'}, + {'label': u'Téléphone', 'name': 'phone', 'kind': 'phone_number'}, + {'label': u'Mobile', 'name': 'mobile', 'kind': 'phone_number'}, ] for i, attribute_dict in enumerate(attributes): diff --git a/tests_authentic/test_hobo_deploy.py b/tests_authentic/test_hobo_deploy.py index 01e5589..640045c 100644 --- a/tests_authentic/test_hobo_deploy.py +++ b/tests_authentic/test_hobo_deploy.py @@ -218,7 +218,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir): 'name': 'city' }, { - 'kind': 'string', + 'kind': 'phone_number', 'description': '', 'required': False, 'user_visible': True, @@ -229,7 +229,7 @@ def test_hobo_deploy(monkeypatch, tenant_base, mocker, skeleton_dir): 'name': 'phone' }, { - 'kind': 'string', + 'kind': 'phone_number', 'description': '', 'required': False, 'user_visible': True, -- 2.24.0