From f1b51d08634e59e9758fc8fb3c20e671fe6e3c8b 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 ++-- tests_schemas/example_env.json | 4 ++-- 3 files changed, 6 insertions(+), 6 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, diff --git a/tests_schemas/example_env.json b/tests_schemas/example_env.json index 2048670..5ac91a7 100644 --- a/tests_schemas/example_env.json +++ b/tests_schemas/example_env.json @@ -113,7 +113,7 @@ "asked_on_registration": false, "description": "", "disabled": false, - "kind": "string", + "kind": "phone_number", "label": "T\u00e9l\u00e9phone", "name": "phone", "required": false, @@ -125,7 +125,7 @@ "asked_on_registration": false, "description": "", "disabled": false, - "kind": "string", + "kind": "phone_number", "label": "Mobile", "name": "mobile", "required": false, -- 2.24.0