seitime-frappe/frappe/patches/v15_0/move_event_cancelled_to_status.py

12 lines
232 B
Python

import frappe
def execute():
Event = frappe.qb.DocType("Event")
query = (
frappe.qb.update(Event)
.set(Event.event_type, "Private")
.set(Event.status, "Cancelled")
.where(Event.event_type == "Cancelled")
)
query.run()