Merged [3379] from esanchez@yaco.es:
Validate title extraction. Fixes #706 - Legacy-Id: 3446 Note: SVN reference [3379] has been migrated to Git commit ac8dff7b56440d730d0e18ff61007ebb7d87ef68
This commit is contained in:
parent
43f1d5da93
commit
1e27d3b619
|
@ -268,11 +268,16 @@ class DraftValidation(object):
|
|||
|
||||
def validate_metadata(self):
|
||||
self.validate_revision()
|
||||
self.validate_title()
|
||||
self.validate_authors()
|
||||
self.validate_abstract()
|
||||
self.validate_creation_date()
|
||||
self.validate_wg()
|
||||
|
||||
def validate_title(self):
|
||||
if not self.draft.id_document_name:
|
||||
self.add_warning('title', 'Title is empty or was not found')
|
||||
|
||||
def validate_wg(self):
|
||||
if self.wg and not self.wg.status.pk == IETFWG.ACTIVE:
|
||||
self.add_warning('group', 'Working Group exists but is not an active WG')
|
||||
|
|
|
@ -147,7 +147,7 @@ returned to the submitter.
|
|||
<tr{% if validation.warnings.group %} class="warning"{% endif %}><th>WG</th><td>{{ validation.wg|default:"Individual Submission" }}<div class="warn_message">{{ validation.warnings.group }}</div></td></tr>
|
||||
<tr{% if validation.warnings.creation_date %} class="warning"{% endif %}><th>Document date</th><td>{{ detail.creation_date }}<div class="warn_message">{{ validation.warnings.creation_date }}</div></td></tr>
|
||||
<tr><th>Submission date</th><td>{{ detail.submission_date }}</td></tr>
|
||||
<tr><th>Title</th><td>{{ detail.id_document_name }}</td></tr>
|
||||
<tr{% if validation.warnings.title %} class="warning"{% endif %}><th>Title</th><td>{{ detail.id_document_name|default:"" }}<div class="warn_message">{{ validation.warnings.title }}</div></td></tr>
|
||||
<tr{% if validation.warnings.authors %} class="warning"{% endif %}><th colspan="2">Author information</th></tr>
|
||||
{% if validation.warnings.authors %}
|
||||
<tr class="warning"><td colspan="2"><div class="warn_message">{{ validation.warnings.authors|safe }}</div></td></tr>
|
||||
|
|
Loading…
Reference in a new issue