Fix: Remove function field from export/import — not on Contact model
This commit is contained in:
@@ -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 "",
|
||||
|
||||
Reference in New Issue
Block a user