'Budget bundle has been deleted => update totals of the budget'

@staticmethod
def budget_budget_bundle_ondelete(row):

    db = current.db
    linktable = current.s3db.budget_budget_bundle
    try:
        record_id = row.id
    except:
        return
    link = db((linktable.id == record_id)).select(linktable.deleted_fk, limitby=(0, 1)).first()
    if link:
        deleted_fk = json.loads(link.deleted_fk)
        budget_entity_id = deleted_fk.get('budget_entity_id')
        if budget_entity_id:
            budget_budget_totals(budget_entity_id)
    return
