Salome HOME
Revert commit bc803f251236fa3b020c (14/03/2020) due to new ForEachLoopDyn implementation
[modules/yacs.git] / src / runtime / DistributedPythonNode.cxx
index 40f75b1187aa4d558bc7b49776b2324e00ea6438..8e7643962167a6650a1580ad8f3fa3701ff2cda0 100644 (file)
@@ -113,12 +113,13 @@ void DistributedPythonNode::load()
     if(!_container)
       throw Exception("No container specified !");
     SalomeContainer *containerCast0(dynamic_cast<SalomeContainer *>(_container));
-    SalomeHPContainerBase *containerCast1(dynamic_cast<SalomeHPContainerBase *>(_container));
+    SalomeHPContainer *containerCast1(dynamic_cast<SalomeHPContainer *>(_container));
     if(containerCast0)
       objContainer=containerCast0->getContainerPtr(this);
     else if(containerCast1)
       {
-        objContainer=containerCast1->getContainerPtr(this);
+        YACS::BASES::AutoCppPtr<SalomeContainerTmpForHP> tmpCont(SalomeContainerTmpForHP::BuildFrom(containerCast1,this));
+        objContainer=tmpCont->getContainerPtr(this);
       }
     else
       throw Exception("Unrecognized type of container ! Salome one is expected !");