diff --git a/beat/web/accounts/management/commands/year_revalidation_users.py b/beat/web/accounts/management/commands/year_revalidation_users.py index 7b64087d2ab7dbd64321cf9d330ee92d261c91a3..90ae93b17b00372efed43c687a17967e62673a46 100644 --- a/beat/web/accounts/management/commands/year_revalidation_users.py +++ b/beat/web/accounts/management/commands/year_revalidation_users.py @@ -40,6 +40,7 @@ from django.template import loader from ...models import SupervisionTrack from ...models import Profile +from ...models import TemporaryUrl from ....ui.registration.models import RegistrationProfile from ....utils import mail @@ -210,9 +211,14 @@ class Command(BaseCommand): if supervisiontrack.expiration_date.date() - now.date() == datetime.timedelta(days=expiration_reminder): warned_count += 1 + temp_url = TemporaryUrl() + temp_url._generate_temporary_url(TemporaryUrl.YEARREVALIDATION, supervisiontrack) + context = { 'user': user, 'expiration_date': supervisiontrack.expiration_date.date(), + "prefix": server_address, + "temp_url": temp_url.url_hash, } mail.send_email('registration/mail.account_revalidation.subject.txt',