feature/rbac-implementation
This commit is contained in:
@@ -64,12 +64,12 @@ async def consume_ws_get_pedimento_completo(**kwargs) -> Dict[str, Any]:
|
||||
|
||||
file_name_request = f"VU_PC_{pedimento_data.get('pedimento_app', 'unknown')}_REQUEST.xml"
|
||||
|
||||
document_response = await pedimento_rest_controller.post_document(
|
||||
document_response = await pedimento_rest_controller.post_or_update_document(
|
||||
soap_response=soap_xml,
|
||||
organizacion=pedimento_data.get('organizacion'),
|
||||
pedimento=pedimento_data.get('id'),
|
||||
file_name=file_name_request,
|
||||
document_type=13,
|
||||
document_type=13,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Error al enviar documento request: {e}")
|
||||
@@ -90,12 +90,12 @@ async def consume_ws_get_pedimento_completo(**kwargs) -> Dict[str, Any]:
|
||||
|
||||
if soap_error(soap_response):
|
||||
logger.error(f"Error en respuesta SOAP: {soap_response.text if hasattr(soap_response, 'text') else 'Sin detalles'}")
|
||||
document_response = await pedimento_rest_controller.post_document(
|
||||
soap_response=None,
|
||||
document_response = await pedimento_rest_controller.post_or_update_document(
|
||||
soap_response=soap_response,
|
||||
organizacion=pedimento_data.get('organizacion'),
|
||||
pedimento=pedimento_data.get('id'),
|
||||
file_name=f"vu_PC_{pedimento_data.get('pedimento_app', 'unknown')}_ERROR.xml",
|
||||
document_type=14,
|
||||
document_type=14,
|
||||
)
|
||||
raise HTTPException(status_code=500, detail="Error en la respuesta del servicio SOAP")
|
||||
|
||||
@@ -111,12 +111,12 @@ async def consume_ws_get_pedimento_completo(**kwargs) -> Dict[str, Any]:
|
||||
|
||||
# Enviar documento
|
||||
try:
|
||||
document_response = await pedimento_rest_controller.post_document(
|
||||
document_response = await pedimento_rest_controller.post_or_update_document(
|
||||
soap_response=soap_response,
|
||||
organizacion=pedimento_data.get('organizacion'),
|
||||
pedimento=pedimento_data.get('id'),
|
||||
file_name=file_name,
|
||||
document_type=2,
|
||||
document_type=2,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Error al enviar documento: {e}")
|
||||
|
||||
Reference in New Issue
Block a user