diff --git a/dplib/plugins/ckan/models/resource.py b/dplib/plugins/ckan/models/resource.py index 5cad672..f67573d 100644 --- a/dplib/plugins/ckan/models/resource.py +++ b/dplib/plugins/ckan/models/resource.py @@ -29,8 +29,13 @@ def to_dp(self) -> Resource: Returns: Data Resource """ + # Path/Name resource = Resource(path=self.name, name=slugify_name(self.name)) + # Description + if self.description: + resource.description = self.description + # Format if self.format: resource.format = self.format.lower() @@ -65,6 +70,10 @@ def from_dp(cls, resource: Resource) -> Optional[CkanResource]: # Path ckan = CkanResource(name=resource.path) + # Description + if resource.description: + ckan.description = resource.description + # Format if resource.format: ckan.format = resource.format.upper()