MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / delete_application_state

Function delete_application_state

web/pgadmin/settings/__init__.py:473–489  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

471 methods=["DELETE"], endpoint='delete_application_state')
472@pga_login_required
473def delete_application_state():
474 status = False
475 msg = gettext('Unable to delete application state data.')
476 if request.data:
477 data = json.loads(request.data)
478 if 'trans_ids' in data:
479 for trans_id in data['trans_ids']:
480 status, msg = delete_tool_data(trans_id)
481 else:
482 trans_id = int(data['panelId'].split('_')[-1])
483 status, msg = delete_tool_data(trans_id)
484 return make_json_response(
485 data={
486 'status': status,
487 'msg': msg,
488 }
489 )
490
491
492def delete_tool_data(trans_id=None):

Callers

nothing calls this directly

Calls 3

make_json_responseFunction · 0.90
gettextFunction · 0.85
delete_tool_dataFunction · 0.85

Tested by

no test coverage detected