diff --git a/dinapy/schemas/project_schema.py b/dinapy/schemas/project_schema.py index 9759e8e..b5452a7 100644 --- a/dinapy/schemas/project_schema.py +++ b/dinapy/schemas/project_schema.py @@ -9,7 +9,7 @@ class Attachment(BaseSchema): class Meta: - type_ = 'attachment' + type_ = 'metadata' class ProjectSchema(Schema): id = fields.Str(load_only=True) @@ -23,7 +23,7 @@ class ProjectSchema(Schema): multilingualDescription = SkipUndefinedField(fields.Dict,allow_none=True,attribute="attributes.multilingualDescription") extensionValues = SkipUndefinedField(fields.Dict,allow_none=True,attribute="attributes.extensionValues") - attachment = create_relationship("project","attachment") + attachment = create_relationship("project","metadata","attachment") meta = fields.DocumentMeta() diff --git a/dinapy/schemas/storageunitusageschema.py b/dinapy/schemas/storageunitusageschema.py index c527ea6..72b7781 100644 --- a/dinapy/schemas/storageunitusageschema.py +++ b/dinapy/schemas/storageunitusageschema.py @@ -25,8 +25,8 @@ class StorageUnitUsage(Schema): createdOn = SkipUndefinedField(fields.DateTime, load_only=True,attribute="attributes.createdOn") createdBy = SkipUndefinedField(fields.Str, load_only=True,attribute="attributes.createdBy") - storageUnit = create_relationship("storage-unit-usage","storageUnit") - storageUnitType = create_relationship("storage-unit-usage","storageUnitType") + storageUnit = create_relationship("storage-unit-usage","storage-unit","storageUnit") + storageUnitType = create_relationship("storage-unit-usage","storage-unit-type","storageUnitType") @post_load def set_none_to_undefined(self, data, **kwargs):