From be86a16733bd77ab74f2f23ace6f614433627c8b Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 23 Jun 2020 09:35:53 +0100 Subject: [PATCH] Exclude created_by_id from TemplateSchemaNoDetail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were already excluding `created_by`, but in a different branch we renamed the property on the schema to `created_by_id`: https://github.com/alphagov/notifications-api/pull/2873/files#diff-691350bfe8029e08252edaad69e871b9R346-R348 We need to rename it in the exclude list to make sure that this assertion still passes: ``` assert json_response['data'][0].keys() == { 'folder', 'id', 'name', 'template_type', } ``` – https://github.com/alphagov/notifications-api/blob/14e7b6b87e4f525d1363a28e2b91882423d513b1/tests/app/template/test_rest.py#L555-L560 --- app/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/schemas.py b/app/schemas.py index 25b2d4396..1dafdba14 100644 --- a/app/schemas.py +++ b/app/schemas.py @@ -369,7 +369,7 @@ class TemplateSchemaNoDetail(TemplateSchema): 'archived', 'content', 'created_at', - 'created_by', + 'created_by_id', 'hidden', 'postage', 'process_type',