Skip to content

Commit

Permalink
New account creation from Ascender: avoid substituting 'None' into ge…
Browse files Browse the repository at this point in the history
…nerated unique email address.
  • Loading branch information
ropable committed Nov 12, 2024
1 parent 034e3b1 commit f2d2494
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions organisation/ascender.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,19 +549,19 @@ def create_ad_user_account(job, cc, job_start_date, licence_type, manager, locat
if job["first_name"]:
first_name = "".join([i.lower() for i in job["first_name"] if i.isalnum()])
else:
first_name = None
first_name = ""
if job["preferred_name"]:
preferred_name = "".join([i.lower() for i in job["preferred_name"] if i.isalnum()])
else:
preferred_name = None
preferred_name = ""
if job["surname"]:
surname = "".join([i.lower() for i in job["surname"] if i.isalnum()])
else:
surname = None
surname = ""
if job["second_name"]:
second_name = "".join([i.lower() for i in job["second_name"] if i.isalnum()])
else:
second_name = None
second_name = ""

# New email address generation.
# Make no assumption about names (presence or absence). Remove any spaces/special characters within name text.
Expand Down

0 comments on commit f2d2494

Please sign in to comment.