fixing aggregation name computation
@@ -981,9 +981,15 @@ class AbstractLogicalFile(models.Model):
@property
def aggregation_name(self):
"""Returns aggregation name as per the aggregation naming rule defined in issue#2568"""
+ if not self.is_fileset:
+ # any aggregation that is not a fileset type, the path of the aggregation primary file
+ # is the aggregation name
primary_file = self.get_primary_resouce_file(self.files.all())
return primary_file.short_path
+ # self is a fileset aggregation - aggregation folder path is the aggregation name
+ return self.folder
+
@property
def metadata_short_file_path(self):
"""File path of the aggregation metadata xml file relative to {resource_id}/data/contents/
