Skip to content

Commit

Permalink
unique components
Browse files Browse the repository at this point in the history
  • Loading branch information
Alzbeta Pokorna committed Dec 11, 2024
1 parent a7e4121 commit 823c25c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ class {{ vars.service_config|class_header }}:
components_list.extend(process_service_configs(type(self).mro()[2:]))
additional_components = [{% for c in vars.service_config.components %}{{ c|extra_code }}{% if not loop.last %}, {% endif %}{% endfor %}]
components_list.extend(additional_components)
return components_list
seen = set()
unique_components = []
for component in components_list:
if component not in seen:
unique_components.append(component)
seen.add(component)

return unique_components

model = "{{ vars.module.qualified }}"

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = oarepo-model-builder
version = 4.0.98
version = 4.0.99
description = A utility library that generates OARepo required data model files from a JSON specification file
authors = Miroslav Bauer <[email protected]>, Miroslav Simek <[email protected]>
readme = README.md
Expand Down

0 comments on commit 823c25c

Please sign in to comment.