From d468456fe170e68761cfb68294f76655145010fb Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Sun, 26 Jul 2026 02:42:07 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Contact=20model=20has=20phone=5F2=20not?= =?UTF-8?q?=20mobilephone=20=E2=80=94=20fix=20export+import=20service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/import_export_service.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/services/import_export_service.py b/app/services/import_export_service.py index b776b1f..c8372b0 100644 --- a/app/services/import_export_service.py +++ b/app/services/import_export_service.py @@ -1,6 +1,6 @@ """Import/export service — CSV import with dry-run preview, CSV/XLSX export. -Uses unified Contact model fields: firstname, surname, email_1, phone_1, mobilephone, function. +Uses unified Contact model fields: firstname, surname, email_1, phone_1, phone_2, function. Company import creates Contact with type='company'. """ @@ -122,7 +122,7 @@ async def import_contacts( """Import contacts from CSV using unified Contact model fields. CSV columns: firstname, surname, email, phone, mobile, function, department. - Maps to Contact fields: firstname, surname, email_1, phone_1, mobilephone, function. + Maps to Contact fields: firstname, surname, email_1, phone_1, phone_2, function. """ rows = _parse_csv(csv_content) total = len(rows) @@ -161,7 +161,7 @@ async def import_contacts( displayname=f"{row['firstname']} {row['surname']}", email_1=row.get("email", "").strip() or None, phone_1=row.get("phone", "").strip() or None, - mobilephone=row.get("mobile", "").strip() or None, + phone_2=row.get("mobile", "").strip() or None, function=row.get("function", "").strip() or None, created_by=user_id, updated_by=user_id, @@ -244,7 +244,7 @@ async def export_contacts_csv( c.name or "", c.email_1 or "", c.phone_1 or "", - c.mobilephone or "", + c.phone_2 or "", c.function or "", c.mailing_city or "", c.mailing_postalcode or "",