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

View File

@ -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)