Files
event-manager/event_manager/patches/migrate_to_multi_payment_gateway.py
T
xadm 786cbc724f
CI / Server (push) Has been cancelled
Linters / Frappe Linter (push) Has been cancelled
Linters / Vulnerable Dependency Check (push) Has been cancelled
UI Tests / Playwright E2E Tests (push) Has been cancelled
Initialize fork and rebrand app to event_manager
2026-05-11 09:56:57 +02:00

21 lines
499 B
Python

import frappe
def execute():
events = frappe.get_all(
"Pohodex Event Manager Event", filters={"payment_gateway": ("is", "set")}, fields=["name", "payment_gateway"]
)
frappe.reload_doc("Events", "doctype", "buzz_event")
frappe.reload_doc("Events", "doctype", "event_payment_gateway")
for event in events:
doc = frappe.get_cached_doc("Pohodex Event Manager Event", event.name)
doc.append(
"payment_gateways",
{
"payment_gateway": event.payment_gateway,
},
)
doc.save()