Skip to content

Commit

Permalink
Performance improvements
Browse files Browse the repository at this point in the history
See syslabcom/scrum#3067 which also shows how
this is effective
  • Loading branch information
ale-rt committed Jan 20, 2025
1 parent b4ab38e commit 3001e0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Changelog
1.0.4 (unreleased)
------------------

- Nothing changed yet.
- Performance improvements
`#3067 <https://github.com/syslabcom/scrum/issues/3067>`_
[ale-rt]


1.0.3 (2024-07-30)
Expand Down
8 changes: 3 additions & 5 deletions src/recensio/plone/viewlets/viewlets.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ def _get_toggle_link(self, uid):

def _get_css_classes(self, obj):
css_classes = []
reviews = [
obj
for obj in obj.objectValues()
if obj.portal_type in ("Review Monograph", "Review Journal")
]
reviews = api.content.find(
context=obj, portal_type=["Review Monograph", "Review Journal"], depth=1
)
if len(reviews) > 0:
css_classes.append("review_container")
if self.is_expanded(obj.UID()):
Expand Down

0 comments on commit 3001e0d

Please sign in to comment.