|
|
@@ -37,7 +37,10 @@ class SendReportNow(views.APIView):
|
|
|
if(int(preport.user_id) != int(user_id)):
|
|
|
raise PermissionDenied(f"Su usuario no es dueño de este reporte({preport.user_id} != {user_id})")
|
|
|
sent = preport.send_report_now()
|
|
|
- print("Se envio" if sent else "No se pudo enviar","el Programmed Report ID:", preport.id)
|
|
|
+ if sent:
|
|
|
+ print("Se envio el Programmed Report ID:", preport.id)
|
|
|
+ else:
|
|
|
+ print("No se pudo enviar el Programmed Report ID:", preport.id)
|
|
|
if not sent:
|
|
|
return Response("Error al comunicarse con clima", status.HTTP_500_INTERNAL_SERVER_ERROR)
|
|
|
return Response("Ok", status.HTTP_200_OK)
|