Skip to content

Commit

Permalink
refactor: return job_id to be able to react to it when job is finishe…
Browse files Browse the repository at this point in the history
…d. (#45111)
  • Loading branch information
nliechti authored Jan 21, 2025
1 parent d73c17a commit dedb96d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ def start_import(self):
template_options=self.template_options,
now=run_now,
)
return True
return job_id

return False
return None


@frappe.whitelist()
Expand All @@ -113,7 +113,8 @@ def get_preview_from_template(data_import, import_file=None, google_sheets_url=N

@frappe.whitelist()
def form_start_import(data_import):
return frappe.get_doc("Bank Statement Import", data_import).start_import()
job_id = frappe.get_doc("Bank Statement Import", data_import).start_import()
return job_id is not None


@frappe.whitelist()
Expand Down

0 comments on commit dedb96d

Please sign in to comment.