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")