(self, with_details=True, **kwargs)
| 878 | setattr(self, purl_field, getattr(package_data, purl_field)) |
| 879 | |
| 880 | def to_dict(self, with_details=True, **kwargs): |
| 881 | mapping = super().to_dict(with_details=with_details, **kwargs) |
| 882 | if not with_details: |
| 883 | # these are not used in the Package subclass |
| 884 | mapping.pop('file_references', None) |
| 885 | mapping.pop('dependencies', None) |
| 886 | mapping.pop('datasource_id', None) |
| 887 | |
| 888 | return mapping |
| 889 | |
| 890 | @classmethod |
| 891 | def from_dict(cls, mapping): |