

def prepare_blasts(blasts, user=None, bundle=False):
    blasts = list(blasts.select_related('user'))
    for blast in blasts:
        blast.set_viewing_user(user)
    if bundle:
        new_blasts = []
        current_bundle = []
        current_bundle_date = None
        for blast in blasts:
            if (blast.short and ((not current_bundle_date) or (blast.created.date() == current_bundle_date))):
                current_bundle.append(blast)
                current_bundle_date = blast.created.date()
            else:
                if current_bundle:
                    new_blasts.append(BlastBundle(current_bundle))
                    current_bundle = []
                    current_bundle_date = None
                new_blasts.append(blast)
        if current_bundle:
            new_blasts.append(BlastBundle(current_bundle))
        blasts = current_bundle
    return blasts

dataset/ETHPy150Open simonw/bugle_project/bugle_project/bugle/views.py prepare_blasts/VarMisuse@173/254 `new_blasts`->`current_bundle`