|
@@ -38,6 +38,8 @@ class SendReportNow(views.APIView):
|
|
|
raise PermissionDenied(f"Su usuario no es dueño de este reporte({preport.user_id} != {user_id})")
|
|
raise PermissionDenied(f"Su usuario no es dueño de este reporte({preport.user_id} != {user_id})")
|
|
|
sent = preport.send_report_now()
|
|
sent = preport.send_report_now()
|
|
|
print("Se envio" if sent else "No se pudo enviar","el Programmed Report ID:", preport.id)
|
|
print("Se envio" if sent else "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)
|
|
return Response("Ok", status.HTTP_200_OK)
|
|
|
|
|
|
|
|
|
|
|