diff --git a/python_binding/graph/pybind_Node.cpp b/python_binding/graph/pybind_Node.cpp index 06c171214d5df261e5df832179a0fa69420aab7d..1fa552ce153b2b0f655ca9f38d1d80f62390184b 100644 --- a/python_binding/graph/pybind_Node.cpp +++ b/python_binding/graph/pybind_Node.cpp @@ -169,7 +169,11 @@ void init_Node(py::module& m) { if (pybind11::isinstance<Connector>(arg)) { // Convert Python object to C++ object adn push it ot vector connectors.push_back(arg.cast<Connector>()); - } else { + } + else if (arg.is(py::none())) { + connectors.push_back(Connector()); + } + else { throw std::runtime_error("One of the arguments was not a Connector."); } }