mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
[minor] plugin architecture, first cut
This commit is contained in:
@@ -15,13 +15,14 @@ def execute():
|
||||
- Write to file
|
||||
- Delete custom script record
|
||||
"""
|
||||
import os
|
||||
from webnotes.utils import get_site_base_path
|
||||
from core.doctype.custom_script.custom_script import make_custom_server_script_file
|
||||
for name, dt, script in webnotes.conn.sql("""select name, dt, script from `tabCustom Script`
|
||||
where script_type='Server'"""):
|
||||
if script.strip():
|
||||
script = indent_using_tabs(script)
|
||||
make_custom_server_script_file(dt, script)
|
||||
webnotes.delete_doc("Custom Script", name)
|
||||
|
||||
def indent_using_tabs(script):
|
||||
for line in script.split("\n"):
|
||||
|
||||
Reference in New Issue
Block a user