Skip to content

Commit

Permalink
Merge pull request #244 from oarepo/miroslavsimek/be-507-bug-customfi…
Browse files Browse the repository at this point in the history
…eldscomponent-warning-shown-too-many-times

fix: CustomFieldsComponent warning shown even if added
  • Loading branch information
mirekys authored Oct 30, 2024
2 parents b7b237b + 5fec283 commit 4aef268
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions oarepo_ui/resources/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,6 @@ class UIComponentsMixin:
@property
def components(self) -> Iterator["UIResourceComponent"]:
"""Return initialized service components."""

# TODO: just for deprecation, will be removed later
for c in self.config.components or []:
if isinstance(c, CustomFieldsComponent):
break
else:
log.warning(
"CustomFieldsComponent not found in components, adding it to be backwards compatible."
)
if not self.config.components:
self.config.components = []
if isinstance(self.config.components, tuple):
self.config.components = list(self.config.components)
self.config.components.append(CustomFieldsComponent)

return (c(self) for c in self.config.components or [])

def run_components(self, action, *args, **kwargs):
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-ui
version = 5.2.18
version = 5.2.19
description = UI module for invenio 3.5+
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 4aef268

Please sign in to comment.