@@ -74,10 +74,11 @@ def additional_desc(self, key, value):
7474 raise IgnoreKey ("additional_descriptions_hr" )
7575
7676
77- @model .over ("subjects" , "(^6931_)|(^650[12_][7_])|(^653[12_]_)|(^695__)|(^694__)" )
77+ @model .over ("subjects" , "(^6931_)|(^650[12_][7_])|(^653[12_]_)|(^695__)|(^694__)" , override = True )
7878@require (["a" ])
7979@for_each_value
8080def hr_subjects (self , key , value ):
81+ keyword = value .get ("a" )
8182 if key == "6531_" :
8283 keyword = value .get ("a" )
8384 if "," in keyword :
@@ -87,14 +88,17 @@ def hr_subjects(self, key, value):
8788 _subjects .append ({"subject" : key })
8889 self ["subjects" ] = _subjects
8990 raise IgnoreKey ("subjects" )
90- else :
91- resource_type_map = {
92- "Presentation" : {"id" : "presentation" },
93- }
94- resource_type = resource_type_map .get (keyword )
95- if resource_type :
96- self ["resource_type" ] = resource_type
97- raise IgnoreKey ("subjects" )
91+
92+ resource_type_map = {
93+ "Presentation" : {"id" : "presentation" },
94+ "Mémos" : {"id" : "publication-memorandum" },
95+ "Formulaires" : {"id" : "publication-form" },
96+ "Form" : {"id" : "publication-form" },
97+ "Modèles de documents" : {"id" : "publication-doctemplate" },
98+ }
99+ resource_type = resource_type_map .get (keyword )
100+ if resource_type :
101+ self ["resource_type" ] = resource_type
98102
99103 subjects (self , key , value )
100104
@@ -153,6 +157,8 @@ def resource_type(self, key, value):
153157 self ["subjects" ] = subjects
154158 if value == "administrativenote" :
155159 raise IgnoreKey ("resource_type" )
160+ if value == "cern-admin-e-guide" and self ["resource_type" ]:
161+ raise IgnoreKey ("resource_type" )
156162 map = {
157163 "annualstats" : {"id" : "publication-report" },
158164 "cern-admin-e-guide" : {"id" : "publication-other" },
0 commit comments