// If this status is the default, then set is_default-flag
// for all other statuses to False:
if form_vars.get("is_default"):
db(table.id != record_id).update(is_default = False)
// If this status is the default closure, then enforce is_closed,
// and set is_default_closure for all other statuses to False
if form_vars.get("is_default_closure"):
After Change
// If this status is the default, then set is_default-flag
// for all other statuses to False:
if form_vars.get("is_default"):
query = (table.is_default == True) & \
(table.id != record_id)
db(query).update(is_default = False)
// If this status is the default closure, then enforce is_closed,
// and set is_default_closure for all other statuses to False
if form_vars.get("is_default_closure"):