Fix tasks.py making tests fail

This commit is contained in:
2026-05-04 22:01:12 +02:00
parent df0579dd86
commit 53b4e89347
+2 -2
View File
@@ -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