From a6b1f332083555a37dc2f8c2118f76e1ae440fff Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Fri, 17 Aug 2018 10:41:55 -0700 Subject: [PATCH] Ensure owner names are lowercase for new / updated certificates --- lemur/common/schema.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lemur/common/schema.py b/lemur/common/schema.py index 4e2c5306..ee765dc4 100644 --- a/lemur/common/schema.py +++ b/lemur/common/schema.py @@ -60,6 +60,8 @@ class LemurSchema(Schema): class LemurInputSchema(LemurSchema): @pre_load(pass_many=True) def preprocess(self, data, many): + if isinstance(data, dict) and data.get('owner'): + data['owner'] = data['owner'].lower() return self.under(data, many=many)