From eddc93c805362631d8fa1986eda8272f87b094e8 Mon Sep 17 00:00:00 2001 From: Flavio Tarsetti <flavio.tarsetti@idiap.ch> Date: Tue, 12 May 2020 18:41:52 +0200 Subject: [PATCH] [accounts][management][commands] Generate temporary url through model manager for yearly account revalidation --- .../accounts/management/commands/year_revalidation_users.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beat/web/accounts/management/commands/year_revalidation_users.py b/beat/web/accounts/management/commands/year_revalidation_users.py index 90ae93b17..7b4021ada 100644 --- a/beat/web/accounts/management/commands/year_revalidation_users.py +++ b/beat/web/accounts/management/commands/year_revalidation_users.py @@ -211,8 +211,7 @@ 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) + temp_url = TemporaryUrl.objects.create_temporary_url(TemporaryUrl.YEARREVALIDATION, supervisiontrack) context = { 'user': user, -- GitLab