Skip to content

Commit 1d3bf56

Browse files
committed
Fix a bug in the new serialization code.
1 parent f6d52cb commit 1d3bf56

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

typed_python/PythonSerializationContext_serialization.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,6 @@ void PythonSerializationContext::serializePythonObject(PyObject* o, Serializatio
4646
// if we have a group, check whether we've already memoized this group in the stream
4747
// this prevents us from initiating the serialization of a new group here.
4848
if (groupAndIndex.first && b.isAlreadyCached(groupAndIndex.first)) {
49-
//see if the object has a name. If so, we always want to use that.
50-
std::string name = getNameForPyObj(o);
51-
52-
if (name.size()) {
53-
// we shouldn't have a name, because if we do we should have serialized
54-
// the MRTG by the name of one of its elements.
55-
throw std::runtime_error("This group should be serialized by name already");
56-
}
57-
5849
b.writeBeginCompound(FieldNumbers::RECURSIVE_OBJECT);
5950
serializeMutuallyRecursiveTypeGroup(groupAndIndex.first, b, 0);
6051

0 commit comments

Comments
 (0)