refactor: Simpler log settings setup (backport #38449) (#38451)

refactor: Simpler log settings setup (#38449)

Depends on https://github.com/frappe/frappe/pull/23507

(cherry picked from commit 1da9087cc4)

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2023-11-30 13:30:15 +05:30
committed by GitHub
parent 05da5bfc9a
commit 7f4d2b707a
4 changed files with 5 additions and 17 deletions

View File

@@ -31,7 +31,6 @@ def after_install():
add_company_to_session_defaults()
add_standard_navbar_items()
add_app_name()
setup_log_settings()
hide_workspaces()
update_roles()
frappe.db.commit()
@@ -221,13 +220,6 @@ def add_app_name():
frappe.db.set_single_value("System Settings", "app_name", "ERPNext")
def setup_log_settings():
log_settings = frappe.get_single("Log Settings")
log_settings.append("logs_to_clear", {"ref_doctype": "Repost Item Valuation", "days": 60})
log_settings.save(ignore_permissions=True)
def hide_workspaces():
for ws in ["Integration", "Settings"]:
frappe.db.set_value("Workspace", ws, "public", 0)