Skip to content

Commit

Permalink
updating the case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
samdanikouser committed Jan 15, 2025
1 parent ec81bda commit e8c019f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions one_fm/patches/v15_0/update_employees_operation_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@frappe.whitelist()
def execute():
# Query to fetch employees and their schedules
# Fetch all employees and their schedules in a single query
query = """
SELECT e.name AS employee, e.shift AS current_shift, es.shift AS schedule_shift, es.operations_role
FROM `tabEmployee` AS e
Expand All @@ -28,7 +28,7 @@ def execute():
if schedule["schedule_shift"] and schedule["current_shift"] == schedule["schedule_shift"]:
updates.append((schedule["operations_role"], schedule["employee"]))

# Proceed only if there are matching records
# Execute bulk update if there are matching records
if updates:
# Prepare the CASE statement and employee IDs for the update
case_statements = []
Expand Down

0 comments on commit e8c019f

Please sign in to comment.