<commit_before># -*- coding: utf-8 -*-
__name__ = "Correct Year to Semester"

def migrate(cr,v):
    cr.execute(" SELECT ar.id, sem.id FROM academy_registration AS ar " 
               " INNER JOIN academy_year AS ay ON ay.id = ar.year_id " 
               " INNER JOIN academy_semester AS sem ON sem.year_id = ay.id AND sem.date_start = (SELECT MIN(sem2.date_start) FROM academy_semester sem2 WHERE sem2.year_id = ay.id)) ")
    
    for ar_id, semester_id in cr.fetchall():
        cr.execute("UPDATE academy_registration SET semester_id = %s WHERE id = %s",(semester_id, ar_id))<commit_msg>[FIX] migration error<commit_after># -*- coding: utf-8 -*-
__name__ = "Correct Year to Semester"

def migrate(cr,v):
    cr.execute(" SELECT ar.id, sem.id FROM academy_registration AS ar " 
               " INNER JOIN academy_year AS ay ON ay.id = ar.year_id " 
               " INNER JOIN academy_semester AS sem ON sem.year_id = ay.id AND sem.date_start = (SELECT MIN(sem2.date_start) FROM academy_semester sem2 WHERE sem2.year_id = ay.id) ")
    
    for ar_id, semester_id in cr.fetchall():
        cr.execute("UPDATE academy_registration SET semester_id = %s WHERE id = %s",(semester_id, ar_id))
{'fraction_non_alphanumeric': 0.11148365465213747, 'fraction_numerical': 0.006705783738474434, 'mean_word_length': 3.131487889273356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3874679', 'n_tokens_mistral': 425, 'n_tokens_neox': 385, 'n_words': 117}