fix: start reposting button not working

This commit is contained in:
Rohit Waghchaure
2025-02-14 15:33:45 +05:30
parent a81867bc43
commit c81ce29e4c

View File

@@ -481,4 +481,9 @@ def in_configured_timeslot(repost_settings=None, current_time=None):
@frappe.whitelist()
def execute_repost_item_valuation():
"""Execute repost item valuation via scheduler."""
frappe.get_doc("Scheduled Job Type", "repost_item_valuation.repost_entries").enqueue(force=True)
if name := frappe.db.get_value(
"Scheduled Job Type",
{"method": "erpnext.stock.doctype.repost_item_valuation.repost_item_valuation.repost_entries"},
"name",
):
frappe.get_doc("Scheduled Job Type", name).enqueue(force=True)