mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
Merge pull request #1054 from alphagov/add-template-redacted-to-history-qry
Add redact_personalisation to TemplateSchema
This commit is contained in:
@@ -297,15 +297,14 @@ class BaseTemplateSchema(BaseSchema):
|
||||
strict = True
|
||||
|
||||
|
||||
class TemplateRedactedSchema(BaseSchema):
|
||||
class Meta:
|
||||
model = models.TemplateRedacted
|
||||
|
||||
|
||||
class TemplateSchema(BaseTemplateSchema):
|
||||
|
||||
created_by = field_for(models.Template, 'created_by', required=True)
|
||||
process_type = field_for(models.Template, 'process_type')
|
||||
redact_personalisation = fields.Method("redact")
|
||||
|
||||
def redact(self, template):
|
||||
return template.redact_personalisation
|
||||
|
||||
@validates_schema
|
||||
def validate_type(self, data):
|
||||
|
||||
Reference in New Issue
Block a user