MCPcopy Index your code
hub / github.com/diffgram/diffgram / api_action_previous

Function api_action_previous

default/methods/action/action_previous.py:11–25  ·  view source on GitHub ↗
(project_string_id, action_id)

Source from the content-addressed store, hash-verified

9 apis_user_list=['api_enabled_builder', 'security_email_verified'])
10@swag_from('../../docs/actions/action_previous.yml')
11def api_action_previous(project_string_id, action_id):
12
13 with sessionMaker.session_scope() as session:
14 log = regular_log.default()
15
16 project = Project.get(session, project_string_id)
17 action = Action.get_by_id(session = session, id = action_id, project_id = project.id)
18
19 previous_action = action.get_previous_action(session=session).serialize()
20
21 if log_has_error(log) >= 1:
22 return jsonify(log = log), 400
23
24 out = jsonify(previous_action=previous_action, log=log)
25 return out, 200

Callers

nothing calls this directly

Calls 5

log_has_errorFunction · 0.90
get_previous_actionMethod · 0.80
getMethod · 0.45
get_by_idMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected