

@require_admin
def delete(self, group_id, data_source_id):
    data_source = models.DataSource.get_by_id_and_org(data_source_id, self.current_org)
    group = models.Group.get_by_id_and_org(data_source, self.current_org)
    data_source.remove_group(group)
    self.record_event({
        'action': 'remove_data_source',
        'timestamp': int(time.time()),
        'object_id': group_id,
        'object_type': 'group',
        'member_id': data_source.id,
    })

dataset/ETHPy150Open getredash/redash/redash/handlers/groups.py GroupDataSourceResource.delete/VarMisuse@40/64 `group_id`->`data_source`