use created_by instead of updated_by

to behave in same way as other endpoints
This commit is contained in:
Leo Hemsted
2017-06-29 12:39:02 +01:00
parent 4839665270
commit 2f973b8af0
2 changed files with 8 additions and 8 deletions

View File

@@ -143,12 +143,12 @@ def _template_has_not_changed(current_data, updated_template):
def redact_template(template, data):
# we also don't need to check what was passed in redact_personalisation - its presence in the dict is enough.
if 'updated_by_id' not in data:
if 'created_by' not in data:
message = 'Field is required'
errors = {'updated_by_id': [message]}
errors = {'created_by': [message]}
raise InvalidRequest(errors, status_code=400)
# if it's already redacted, then just return 200 straight away.
if not template.redact_personalisation:
dao_redact_template(template, data['updated_by_id'])
dao_redact_template(template, data['created_by'])
return 'null', 200