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:
        # Now coagulate chains of blasts with 'short' set in to bundles
        new_blasts = []
        current_bundle = []
        current_bundle_date = None
        for blast in blasts:
            if blast.short and (
                    not current_bundle_date 
                    and 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)
        
        # Any stragglers?
        if current_bundle:
            new_blasts.append(BlastBundle(current_bundle))
        
        blasts = new_blasts
    
    return blasts
dataset/ETHPy150Open simonw/bugle_project/bugle_project/bugle/views.py/prepare_blasts/operator `or` -> `and`