58
58
from ietf .utils .mail import is_valid_email
59
59
from ietf .utils .text import parse_unicode , normalize_text
60
60
from ietf .utils .timezone import date_today
61
- from ietf .utils .xmldraft import XMLDraft
61
+ from ietf .utils .xmldraft import InvalidMetadataError , XMLDraft
62
62
from ietf .person .name import unidecode_name
63
63
64
64
@@ -1201,6 +1201,11 @@ def process_submission_xml(filename, revision):
1201
1201
if not title :
1202
1202
raise SubmissionError ("Could not extract a valid title from the XML" )
1203
1203
1204
+ try :
1205
+ document_date = xml_draft .get_creation_date ()
1206
+ except InvalidMetadataError as err :
1207
+ raise SubmissionError (str (err )) from err
1208
+
1204
1209
return {
1205
1210
"filename" : xml_draft .filename ,
1206
1211
"rev" : xml_draft .revision ,
@@ -1210,7 +1215,7 @@ def process_submission_xml(filename, revision):
1210
1215
for auth in xml_draft .get_author_list ()
1211
1216
],
1212
1217
"abstract" : None , # not supported from XML
1213
- "document_date" : xml_draft . get_creation_date () ,
1218
+ "document_date" : document_date ,
1214
1219
"pages" : None , # not supported from XML
1215
1220
"words" : None , # not supported from XML
1216
1221
"first_two_pages" : None , # not supported from XML
0 commit comments