'Default all weightings to an even spread
@ToDo: Handle deployment_settings which have Indicators directly
attached to Projects'

def project_indicator_create_onaccept(self, form):

    db = current.db
    record_id = form.vars.id
    table = current.s3db.project_indicator
    record = db((table.id == record_id)).select(table.output_id, limitby=(0, 1)).first()
    try:
        output_id = record.output_id
    except:
        current.log.error('Cannot    find    Project    Indicator    record    (no    record    for    this    ID),    so    cannot    setup    default    weightings')
        return
    query = ((table.output_id == output_id) & (table.deleted == False))
    records = db(query).select(table.id)
    weighting = (1.0 / len(records))
    for r in records:
        r.update_record(weighting=weighting)
    self.project_indicator_onaccept(form, create=True)
