diff --git a/app/services/yml_loader.rb b/app/services/yml_loader.rb index a3c940b6..aa286c6f 100644 --- a/app/services/yml_loader.rb +++ b/app/services/yml_loader.rb @@ -27,11 +27,12 @@ def load_subjects subjects.each do |code, subject| new_subject = Subject.find_or_initialize_by(code:) - new_subject.name = format_name(subject["name"]) - new_subject.credits = subject["credits"] + subject_overrides = subjects_overrides[code] || {} + + new_subject.name = subject_overrides["name"] || format_name(subject["name"]) + new_subject.credits = subject_overrides["credits"] || subject["credits"] new_subject.group = SubjectGroup.find_by(code: subject["subject_group"]) - subject_overrides = subjects_overrides[code] || {} new_subject.eva_id = subject_overrides['eva_id'] new_subject.openfing_id = subject_overrides['openfing_id'] new_subject.short_name = subject_overrides['short_name'] diff --git a/db/data/subject_overrides.yml b/db/data/subject_overrides.yml index c2965c64..6ba3c76f 100644 --- a/db/data/subject_overrides.yml +++ b/db/data/subject_overrides.yml @@ -1218,3 +1218,11 @@ R100: category: 'inactive' '1940': category: 'inactive' +'01': + name: FQ - Matemática 01 (Análisis I) + short_name: FQ - Mat. 01 (Análisis I) + credits: 14 +'101': + name: FQ - Matemática 101 (Análisis I) + short_name: FQ - Mat. 101 (Análisis I) + credits: 17