From 53b4e89347a1f3059020bb4a9fc4d43c332fb253 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 4 May 2026 22:01:12 +0200 Subject: [PATCH] Fix tasks.py making tests fail --- tienda/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tienda/tasks.py b/tienda/tasks.py index f111d5b..13eca94 100644 --- a/tienda/tasks.py +++ b/tienda/tasks.py @@ -37,7 +37,7 @@ def enviar_correo_recuperacion(email: str): try: usuario = User.objects.get(email=email) except User.DoesNotExist as e: - print("ERROR: User does not exist, Cancelling task!") + usuario = None if usuario is not None: ver_code = VerificationCode.objects.create( code_mode = VerificationCode.VerificationModes.RESET_PASSWORD, @@ -58,7 +58,7 @@ def enviar_correo_recuperacion(email: str): send_hemail(email, "Reset de ContraseƱa", html_content, "Estas reseteando la contraseƱa...") else: - + print("User does not exist, Cancelling TASK.") # Purchased items should be a list of dictionary, the dictionary must follow this tags: amount, product name, price (each) @shared_task