(self, nested_obj, attr, obj, **kwargs)
| 621 | ] |
| 622 | |
| 623 | def _serialize(self, nested_obj, attr, obj, **kwargs): |
| 624 | # Load up the schema first. This allows a RegistryError to be raised |
| 625 | # if an invalid schema name was passed |
| 626 | schema = self.schema |
| 627 | if nested_obj is None: |
| 628 | return None |
| 629 | many = schema.many or self.many |
| 630 | return schema.dump(nested_obj, many=many) |
| 631 | |
| 632 | def _test_collection(self, value: typing.Any) -> None: |
| 633 | many = self.schema.many or self.many |