MCPcopy Create free account
hub / github.com/alephdata/aleph / serialize_many

Method serialize_many

aleph/views/serializers.py:60–73  ·  view source on GitHub ↗
(self, objs)

Source from the content-addressed store, hash-verified

58 return self._serialize_common(obj)
59
60 def serialize_many(self, objs):
61 collected = []
62 for obj in ensure_list(objs):
63 obj = self._to_dict(obj)
64 if obj is not None:
65 self.collect(obj)
66 collected.append(obj)
67 resolver.resolve(request)
68 serialized = []
69 for obj in collected:
70 obj = self._serialize_common(obj)
71 if obj is not None:
72 serialized.append(obj)
73 return serialized
74
75 def _to_dict(self, obj):
76 if hasattr(obj, "to_dict"):

Callers 3

to_dictMethod · 0.80
indexFunction · 0.80
indexFunction · 0.80

Calls 4

_to_dictMethod · 0.95
collectMethod · 0.95
_serialize_commonMethod · 0.95
resolveMethod · 0.45

Tested by

no test coverage detected