Check also in trash

This commit is contained in:
Adrià Casajús 2023-04-11 17:15:36 +02:00
parent ad11c194b7
commit ce2269d3eb
No known key found for this signature in database
GPG key ID: F0033226A5AFC9B9

View file

@ -1531,7 +1531,7 @@ class Alias(Base, ModelMixin):
suffix = user.get_random_alias_suffix()
email = f"{prefix}.{suffix}@{config.FIRST_ALIAS_DOMAIN}"
if available_sl_email(email, check_trash=False):
if available_sl_email(email):
break
return Alias.create(