test: clear singles cache for changed settings (#29430)

This commit is contained in:
Ankush Menat 2022-01-24 18:44:08 +05:30 committed by GitHub
parent 108d1045e6
commit 3d3f0139fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,6 +92,8 @@ def change_settings(doctype, settings_dict):
for key, value in settings_dict.items():
setattr(settings, key, value)
settings.save()
# singles are cached by default, clear to avoid flake
frappe.db.value_cache[settings] = {}
yield # yield control to calling function
finally: