Make the update template endpoint work when process_type is present.

This commit is contained in:
Rebecca Law
2017-01-17 15:48:51 +00:00
parent e360a1f8f6
commit 41b49eb8e0
3 changed files with 23 additions and 2 deletions

View File

@@ -208,6 +208,7 @@ class BaseTemplateSchema(BaseSchema):
class TemplateSchema(BaseTemplateSchema):
created_by = field_for(models.Template, 'created_by', required=True)
process_type = field_for(models.Template, 'process_type')
@validates_schema
def validate_type(self, data):

View File

@@ -144,5 +144,5 @@ def _strip_html(content):
def _template_has_not_changed(current_data, updated_template):
return all(
current_data[key] == updated_template[key]
for key in ('name', 'content', 'subject', 'archived')
for key in ('name', 'content', 'subject', 'archived', 'process_type')
)