<commit_before><%

    include_blank = (admin_logged_in? && params[:programme_id].blank?) ? "No associated #{t('programme')}" : nil
    available = User.current_user.person.administered_programmes.activated
    if params[:programme_id]
      available.select!{|p| p.id.to_s == params[:programme_id]}
    end


%>
<p>
<%= f.label "Associated #{t('programme')}" %>
<%=
    f.collection_select :programme_id, available, :id, :title, selected:params[:programme_id],include_blank:include_blank,:class => "form-control"
%>
</p><commit_msg>correctly select associated programme<commit_after><%

    include_blank = (admin_logged_in? && params[:programme_id].blank?) ? "No associated #{t('programme')}" : nil
    available = User.current_user.person.administered_programmes.activated
    if params[:programme_id]
      available.select!{|p| p.id.to_s == params[:programme_id]}
    end

    selected = params[:programme_id] || @project.programme_id


%>
<p>
<%= f.label "Associated #{t('programme')}" %>
<%=
    f.collection_select :programme_id, available, :id, :title, selected:selected,include_blank:include_blank,:class => "form-control"
%>
</p>
{'fraction_non_alphanumeric': 0.17280701754385966, 'fraction_numerical': 0.0, 'mean_word_length': 5.52, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7051903', 'n_tokens_mistral': 401, 'n_tokens_neox': 387, 'n_words': 61}