Merge pull request #12428 from shariquerik/scheduled-job-type-fix

fix: Scheduled Job Type execute not working
This commit is contained in:
mergify[bot] 2021-02-25 14:44:52 +00:00 committed by GitHub
commit 6f7d8a831b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -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):

View file

@ -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