From 7ebd0bf5d46f5b9fbbc1725e77ff3840fcf13ec6 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Thu, 24 Sep 2015 08:40:42 -0700 Subject: [PATCH] making fields required --- lemur/certificates/views.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lemur/certificates/views.py b/lemur/certificates/views.py index bd267cdc..55d62f28 100644 --- a/lemur/certificates/views.py +++ b/lemur/certificates/views.py @@ -316,18 +316,17 @@ class CertificatesList(AuthenticatedResource): self.reqparse.add_argument('extensions', type=dict, location='json') self.reqparse.add_argument('destinations', type=list, default=[], location='json') self.reqparse.add_argument('notifications', type=list, default=[], location='json') - self.reqparse.add_argument('owner', type=str, location='json') self.reqparse.add_argument('validityStart', type=str, location='json') # TODO validate self.reqparse.add_argument('validityEnd', type=str, location='json') # TODO validate - self.reqparse.add_argument('authority', type=valid_authority, location='json') - self.reqparse.add_argument('description', type=str, location='json') - self.reqparse.add_argument('country', type=str, location='json') - self.reqparse.add_argument('state', type=str, location='json') - self.reqparse.add_argument('location', type=str, location='json') - self.reqparse.add_argument('organization', type=str, location='json') - self.reqparse.add_argument('organizationalUnit', type=str, location='json') - self.reqparse.add_argument('owner', type=str, location='json') - self.reqparse.add_argument('commonName', type=str, location='json') + self.reqparse.add_argument('authority', type=valid_authority, location='json', required=True) + self.reqparse.add_argument('description', type=str, location='json', required=True) + self.reqparse.add_argument('country', type=str, location='json', required=True) + self.reqparse.add_argument('state', type=str, location='json', required=True) + self.reqparse.add_argument('location', type=str, location='json', required=True) + self.reqparse.add_argument('organization', type=str, location='json', required=True) + self.reqparse.add_argument('organizationalUnit', type=str, location='json', required=True) + self.reqparse.add_argument('owner', type=str, location='json', required=True) + self.reqparse.add_argument('commonName', type=str, location='json', required=True) args = self.reqparse.parse_args()