fix alias generation not using second part

This commit is contained in:
Ash Garcia 2024-08-11 23:21:07 -07:00
parent 5ab9b99b73
commit ec379045cc

View file

@ -258,7 +258,7 @@ def maybe_generate_aliases(
for row in csv_contents:
rnd = Random(",".join([row[KnownColumns.EmailAddress], seed]))
random_alias = f"{rnd.choice(alias_parts[0])} {rnd.choice(alias_parts[0])}"
random_alias = f"{rnd.choice(alias_parts[0])} {rnd.choice(alias_parts[1])}"
while (
random_alias in alias_to_email_address
and alias_to_email_address[random_alias] != row[KnownColumns.EmailAddress]