Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
folix-01 committed Oct 17, 2023
1 parent 442d551 commit 3316e62
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/redturtle/prenotazioni/adapters/stringinterp.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,9 @@ def safe_call(self):
site_url = api.portal.get().absolute_url()
content_history_viewlet.navigation_root_url = site_url
content_history_viewlet.site_url = site_url
history = content_history_viewlet.fullHistory()
refuse_history = sorted(
[
i
for i in history
if i.get("type", "") == "workflow" and i.get("action", "") == "refuse"
],
key=lambda i: i.get("time"),
reverse=True,
)
history = content_history_viewlet.workflowHistory()

refuse_history = [i for i in history if i.get("action", "") == "refuse"]

refuse_message = refuse_history and refuse_history[0].get("comments") or ""

Expand Down

0 comments on commit 3316e62

Please sign in to comment.