diff --git a/modules/weko-workflow/weko_workflow/api.py b/modules/weko-workflow/weko_workflow/api.py index 80c221a13f..efccdeb0c7 100644 --- a/modules/weko-workflow/weko_workflow/api.py +++ b/modules/weko-workflow/weko_workflow/api.py @@ -2503,7 +2503,7 @@ def get_activity_steps(self, activity_id): his = WorkActivityHistory() histories = his.get_activity_history_list(activity_id) if not histories: - abort(404) + return [] history_dict = {} activity = WorkActivity() activity_detail = activity.\ diff --git a/modules/weko-workflow/weko_workflow/views.py b/modules/weko-workflow/weko_workflow/views.py index 4a55ec9bbe..8d4135ee57 100644 --- a/modules/weko-workflow/weko_workflow/views.py +++ b/modules/weko-workflow/weko_workflow/views.py @@ -758,6 +758,9 @@ def render_guest_workflow(file_name=""): ) form = FlaskForm(request.form) + if not guest_activity.get("steps",[]): + current_app.logger.error("can not get workflow_action_history:{}".format(activity_id)) + abort(404) return render_template( 'weko_workflow/activity_detail.html', @@ -880,7 +883,9 @@ def display_activity(activity_id="0", community_id=None): current_app.logger.error("display_activity: can not get activity display info") return render_template("weko_theme/error.html", error="can not get data required for rendering") - + if not steps: + current_app.logger.error("can not get workflow_action_history:{}".format(activity_id)) + abort(404) # display_activity of Identifier grant identifier_setting = None if action_endpoint == 'identifier_grant' and item: