Handle xml aggregation files in basic integrity checks.
@@ -2054,6 +2054,16 @@ class AbstractResource(ResourcePermissionsMixin, ResourceIRODSMixin):
self.save()
return metatdata_obj
+ def is_aggregation_xml_file(self, file_path):
+ """Checks if the file path *file_path* is one of the aggregation related xml file paths
+
+ :param file_path: full file path starting with resource short_id
+ :return True if file_path is one of the aggregation xml file paths else False
+
+ This function is overridden for Composite Resource.
+ """
+ return False
+
def extra_capabilites(self):
"""Return None. No-op method.
@@ -2630,7 +2640,7 @@ class AbstractResource(ResourcePermissionsMixin, ResourceIRODSMixin):
if f.storage_path == fullpath:
found = True
break
- if not found:
+ if not found and not self.is_aggregation_xml_file(fullpath):
ecount += 1
msg = "check_irods_files: file {} in iRODs does not exist in Django"\
.format(fullpath)
