From 28101612db1c31d11c77b2d965cb621be2890dac Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Wed, 15 Apr 2020 22:51:18 +0200 Subject: [PATCH] Use FIRST_ALIAS_DOMAIN to create first alias --- app/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models.py b/app/models.py index f34123fb..0456a352 100644 --- a/app/models.py +++ b/app/models.py @@ -21,6 +21,7 @@ from app.config import ( JOB_ONBOARDING_3, JOB_ONBOARDING_4, LANDING_PAGE_URL, + FIRST_ALIAS_DOMAIN, ) from app.extensions import db from app.log import LOG @@ -622,7 +623,7 @@ class Alias(db.Model, ModelMixin): # find the right suffix - avoid infinite loop by running this at max 1000 times for i in range(1000): suffix = random_word() - email = f"{prefix}.{suffix}@{EMAIL_DOMAIN}" + email = f"{prefix}.{suffix}@{FIRST_ALIAS_DOMAIN}" if not cls.get_by(email=email): break