test: revert original pcv setting

(cherry picked from commit f45a5a63a7)
This commit is contained in:
Smit Vora
2026-02-03 16:30:05 +05:30
committed by Mergify
parent 8caf609f8d
commit 77693b12a4

View File

@@ -1794,6 +1794,9 @@ class TestFinancialQueryBuilder(FinancialReportTemplateTestCase):
pcv = None
jv_2024 = None
original_pcv_setting = frappe.db.get_single_value(
"Accounts Settings", "use_legacy_controller_for_pcv"
)
try:
# Create Period Closing Voucher for 2023
@@ -1938,6 +1941,10 @@ class TestFinancialQueryBuilder(FinancialReportTemplateTestCase):
finally:
# Clean up
frappe.db.set_single_value(
"Accounts Settings", "use_legacy_controller_for_pcv", original_pcv_setting or 0
)
if jv_2024:
jv_2024.cancel()