Ensure owner names are lowercase for new / updated certificates

This commit is contained in:
Curtis Castrapel 2018-08-17 10:41:55 -07:00
parent cc4cdfcf13
commit a6b1f33208
1 changed files with 2 additions and 0 deletions

View File

@ -60,6 +60,8 @@ class LemurSchema(Schema):
class LemurInputSchema(LemurSchema): class LemurInputSchema(LemurSchema):
@pre_load(pass_many=True) @pre_load(pass_many=True)
def preprocess(self, data, many): def preprocess(self, data, many):
if isinstance(data, dict) and data.get('owner'):
data['owner'] = data['owner'].lower()
return self.under(data, many=many) return self.under(data, many=many)