Fix: Remove function field from export/import — not on Contact model

This commit is contained in:
Agent Zero
2026-07-26 02:45:04 +02:00
parent d468456fe1
commit 444c7fdb88
+1 -3
View File
@@ -162,7 +162,6 @@ async def import_contacts(
email_1=row.get("email", "").strip() or None,
phone_1=row.get("phone", "").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,
)
@@ -232,7 +231,7 @@ async def export_contacts_csv(
output = io.StringIO()
writer = csv.writer(output)
writer.writerow(
["id", "type", "firstname", "surname", "name", "email", "phone", "mobile", "function", "city", "postalcode", "country"]
["id", "type", "firstname", "surname", "name", "email", "phone", "mobile", "city", "postalcode", "country"]
)
for c in contacts:
writer.writerow(
@@ -245,7 +244,6 @@ async def export_contacts_csv(
c.email_1 or "",
c.phone_1 or "",
c.phone_2 or "",
c.function or "",
c.mailing_city or "",
c.mailing_postalcode or "",
c.mailing_country or "",