Commit a017e7b8 authored by Bram's avatar Bram
Browse files

[enh] export emails

parent b07a3bc3
......@@ -16,6 +16,9 @@ class Command(BaseCommand):
reps["personal"]["gender"] = gender_dict[representative.gender]
reps["personal"]["birth_date"] = representative.birth_date.strftime("%F") if representative.birth_date else None
reps["contact"] = {}
reps["contact"]["emails"] = [{"email": email.email, "type": email.kind} for email in representative.email_set.all()]
result.append(reps)
print json.dumps(result, indent=4)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment