Version 6.x.x Source

frappe.model.utils.set_default (doc, key)

Set is_default property of given doc and unset all others filtered by given key.