Skip to content

Commit

Permalink
component: fix update_draft
Browse files Browse the repository at this point in the history
  • Loading branch information
carlinmack committed Mar 7, 2025
1 parent c7b8368 commit 7efd1be
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions invenio_checks/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ def update_draft(self, identity, data=None, record=None, errors=None, **kwargs):
return

communities = []
if record.review.is_open:
communities.append(record.review.community)
if (
record.parent.review.status == "submitted"
or record.parent.review.status == "created"
):
communities.append(record.parent.review.receiver.resolve())
else:
return

communities.extend(record.parent.communities.entries)
checks = itertools.chain(*[c.checks for c in communities])
checks = itertools.chain(*[c.get("checks", None) for c in communities])

for check in checks:
try:
Expand Down

0 comments on commit 7efd1be

Please sign in to comment.