Skip to content

Commit

Permalink
Fixed exception in links when topic is no longer active
Browse files Browse the repository at this point in the history
  • Loading branch information
mesemus committed Sep 29, 2024
1 parent 798e872 commit 3b80050
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion oarepo_requests/actions/publish_draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class PublishDraftSubmitAction(OARepoSubmitAction):
def can_execute(self):
if not super().can_execute():
return False
topic = self.request.topic.resolve()
try:
topic = self.request.topic.resolve()
except: # noqa: used for links, so ignore errors here
return False
topic_service = get_record_service_for_record(topic)
try:
topic_service.validate_draft(system_identity, topic["id"])
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-requests
version = 2.1.4
version = 2.1.5
description =
authors = Ronald Krist <[email protected]>
readme = README.md
Expand Down

0 comments on commit 3b80050

Please sign in to comment.