Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions emf/common/helpers/opdm_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand All @@ -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])
opdm_object = create_opdm_objects([rdfzip_files])
Loading