mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 21:35:19 +00:00
fix(ppcv): replace incorrect usage of frappe.in_test with frappe.flags.in_test in version-15 (#57579)
This commit is contained in:
@@ -124,7 +124,7 @@ def initialize_parallel_threads(docname: str):
|
|||||||
)
|
)
|
||||||
# keep transaction on PPCV and PPCVD short
|
# keep transaction on PPCV and PPCVD short
|
||||||
# prevents concurrency errors - REPEATABLE READ
|
# prevents concurrency errors - REPEATABLE READ
|
||||||
if not frappe.in_test:
|
if not frappe.flags.in_test:
|
||||||
frappe.db.commit() # nosemgrep
|
frappe.db.commit() # nosemgrep
|
||||||
else:
|
else:
|
||||||
frappe.db.set_value("Process Period Closing Voucher", docname, "status", "Completed")
|
frappe.db.set_value("Process Period Closing Voucher", docname, "status", "Completed")
|
||||||
@@ -272,7 +272,7 @@ def schedule_next_date(docname: str):
|
|||||||
)
|
)
|
||||||
# keep transaction on PPCV and PPCVD short
|
# keep transaction on PPCV and PPCVD short
|
||||||
# prevents concurrency errors - REPEATABLE READ
|
# prevents concurrency errors - REPEATABLE READ
|
||||||
if not frappe.in_test:
|
if not frappe.flags.in_test:
|
||||||
frappe.db.commit() # nosemgrep
|
frappe.db.commit() # nosemgrep
|
||||||
|
|
||||||
frappe.enqueue(
|
frappe.enqueue(
|
||||||
@@ -449,7 +449,7 @@ def summarize_and_post_ledger_entries(docname):
|
|||||||
|
|
||||||
# keep transaction on PPCV and PPCVD short
|
# keep transaction on PPCV and PPCVD short
|
||||||
# prevents concurrency errors - REPEATABLE READ
|
# prevents concurrency errors - REPEATABLE READ
|
||||||
if not frappe.in_test:
|
if not frappe.flags.in_test:
|
||||||
frappe.db.commit() # nosemgrep
|
frappe.db.commit() # nosemgrep
|
||||||
|
|
||||||
frappe.db.set_value("Period Closing Voucher", pcv.name, "gle_processing_status", "Completed")
|
frappe.db.set_value("Period Closing Voucher", pcv.name, "gle_processing_status", "Completed")
|
||||||
@@ -599,7 +599,7 @@ def process_individual_date(docname: str, row_name, date, report_type, parentfie
|
|||||||
"Completed",
|
"Completed",
|
||||||
)
|
)
|
||||||
# commit heavy computation before touching PPCV or PPCVD
|
# commit heavy computation before touching PPCV or PPCVD
|
||||||
if not frappe.in_test:
|
if not frappe.flags.in_test:
|
||||||
frappe.db.commit() # nosemgrep
|
frappe.db.commit() # nosemgrep
|
||||||
|
|
||||||
# chain call
|
# chain call
|
||||||
|
|||||||
Reference in New Issue
Block a user