You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added an API for draft submission, at /api/submit. Added an urls.py file under api/ to hold api urls, and moved those from ietf/urls.py. Refactored out many parts of the regular submission forms and functions in submit/forms.py and submit/views.py in order to re-use the appropriate parts for the submission API. Moved support functions to submit/utils.py. Added a new validation errors for missing docName in xml-based submissions. Updated the submission test document templates to use insert additional values. Added failure and success test cases for automated API submissions, and refactored some test utility functions.
raiseforms.ValidationError('You must submit at least a valid .txt or a valid .xml file; didn\'t find either.')
129
+
raiseforms.ValidationError('Unexpected submission file types; found %s, but %s is required'% (', '.join(self.file_types), ' or '.join(self.base_formats)))
133
130
134
131
#debug.show('self.cleaned_data["xml"]')
135
132
ifself.cleaned_data.get('xml'):
@@ -168,6 +165,8 @@ def clean(self):
168
165
)
169
166
self.xmlroot=self.xmltree.getroot()
170
167
draftname=self.xmlroot.attrib.get('docName')
168
+
ifdraftnameisNone:
169
+
raiseforms.ValidationError("No docName attribute found in the xml root element")
0 commit comments