"""Give existing bib allocations their edition, so bib numbers are checked per edition.""" import frappe def execute(): frappe.db.sql( """update `tabBib Allocation` b join `tabRegistration` r on r.name = b.registration set b.event_edition = r.event_edition where b.event_edition is null or b.event_edition = ''""" )