diff --git a/emf/common/helpers/opdm_objects.py b/emf/common/helpers/opdm_objects.py index cf6aa868..b53231e3 100644 --- a/emf/common/helpers/opdm_objects.py +++ b/emf/common/helpers/opdm_objects.py @@ -192,7 +192,13 @@ def create_opdm_objects(models: list, metadata: dict | None = None, key_profile: # Add DATA opdm_profile['DATA'] = profile_instance.getvalue() - + + # Allowed IGM profiles + igm_profiles = {'SV', 'SSH', 'EQ', 'TP'} + # Skip BD files if IGM has them + if opdm_object['opde:Object-Type'] == "IGM" and opdm_profile.get('pmd:cgmesProfile') not in igm_profiles: + continue + # Add component to main object opdm_object['opde:Component'].append({'opdm:Profile': opdm_profile}) @@ -217,4 +223,4 @@ def filename_from_opdm_metadata(metadata: dict, file_type: str | None = None): if __name__ == "__main__": # Create OPDM objects - opdm_object = create_opdm_objects([rdfzip_files]) \ No newline at end of file + opdm_object = create_opdm_objects([rdfzip_files])