Merge pull request #12428 from shariquerik/scheduled-job-type-fix
fix: Scheduled Job Type execute not working
This commit is contained in:
commit
6f7d8a831b
2 changed files with 3 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ class ScheduledJobType(Document):
|
|||
def execute(self):
|
||||
self.scheduler_log = None
|
||||
try:
|
||||
self.log_status('Start')
|
||||
self.log_status('Started')
|
||||
if self.server_script:
|
||||
script_name = frappe.db.get_value("Server Script", self.server_script)
|
||||
if script_name:
|
||||
|
|
@ -117,6 +117,7 @@ def execute_event(doc: str):
|
|||
frappe.only_for("System Manager")
|
||||
doc = json.loads(doc)
|
||||
frappe.get_doc("Scheduled Job Type", doc.get("name")).enqueue(force=True)
|
||||
return doc
|
||||
|
||||
|
||||
def run_scheduled_job(job_type: str):
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ frappe.ui.form.Form = class FrappeForm {
|
|||
}
|
||||
}
|
||||
if (action.action_type==='Server Action') {
|
||||
frappe.xcall(action.action, {doc: this.doc}).then((doc) => {
|
||||
frappe.xcall(action.action, {'doc': this.doc}).then((doc) => {
|
||||
if (doc.doctype) {
|
||||
// document is returned by the method,
|
||||
// apply the changes locally and refresh
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue