14 lines
459 B
Python
14 lines
459 B
Python
import frappe
|
|
|
|
|
|
def execute():
|
|
"""SB Process.status now defaults to 'Unknown' for new records, but existing
|
|
records created before that default was added are still NULL/blank — which
|
|
silently falls outside the Pass/Fail/Unknown breakdown shown on the dashboard.
|
|
Backfill them so every record has one of exactly the three valid statuses."""
|
|
frappe.db.sql("""
|
|
UPDATE `tabSB Process`
|
|
SET status = 'Unknown'
|
|
WHERE status IS NULL OR status = ''
|
|
""")
|