From afbdb46fe8dbf854f0ed34ab0dcc6c190b4f31ed Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 20 Jan 2026 15:47:55 +0530 Subject: [PATCH] fix: open to work patch --- lms/patches/v2_0/open_to_work.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lms/patches/v2_0/open_to_work.py b/lms/patches/v2_0/open_to_work.py index d1840451..e8b177b1 100644 --- a/lms/patches/v2_0/open_to_work.py +++ b/lms/patches/v2_0/open_to_work.py @@ -6,3 +6,7 @@ def execute(): if not open_to_field_exists: return + + open_to_opportunities = frappe.get_all("User", {"open_to": "Opportunities"}, ["name"]) + for user in open_to_opportunities: + frappe.db.set_value("User", user.name, "open_to", "Work")