Skip to content

Commit

Permalink
fix: Fixed prefix not appearing in fn
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamgutgutia committed Nov 19, 2023
1 parent 053e7a4 commit 2544878
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/vcfGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ def generateVcard(row, headers, vCards):
vcard = vobject.vCard()

fnParameters = [row.get(headers.get(string,""),"") for string in ["First Name","Middle Name","Last Name"]]
fnParameters=request.form.get("Prefix",[])+fnParameters+request.form.get("Suffix",[])
prefix = [request.form.get("Prefix")] if "Prefix" in request.form else []
suffix = [request.form.get("Suffix")] if "Suffix" in request.form else []
fnParameters=prefix+fnParameters+suffix
fn = " ".join(filter(None,fnParameters))
if fn:
vcard.add("fn").value = fn
Expand Down

0 comments on commit 2544878

Please sign in to comment.