From b7d0e62844765b284ac750e8aed64917df6e3272 Mon Sep 17 00:00:00 2001 From: sayali Date: Wed, 7 Oct 2020 13:31:23 -0700 Subject: [PATCH] Make location optional Remove form validation and default value in input schema --- lemur/authorities/schemas.py | 4 +--- lemur/certificates/schemas.py | 4 +--- .../angular/authorities/authority/distinguishedName.tpl.html | 3 +-- .../certificates/certificate/distinguishedName.tpl.html | 4 +--- lemur/tests/test_certificates.py | 5 +++-- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/lemur/authorities/schemas.py b/lemur/authorities/schemas.py index bead94ba..f80d1581 100644 --- a/lemur/authorities/schemas.py +++ b/lemur/authorities/schemas.py @@ -43,9 +43,7 @@ class AuthorityInputSchema(LemurInputSchema): organization = fields.String( missing=lambda: current_app.config.get("LEMUR_DEFAULT_ORGANIZATION") ) - location = fields.String( - missing=lambda: current_app.config.get("LEMUR_DEFAULT_LOCATION") - ) + location = fields.String() country = fields.String( missing=lambda: current_app.config.get("LEMUR_DEFAULT_COUNTRY") ) diff --git a/lemur/certificates/schemas.py b/lemur/certificates/schemas.py index f393aa49..a360140e 100644 --- a/lemur/certificates/schemas.py +++ b/lemur/certificates/schemas.py @@ -107,9 +107,7 @@ class CertificateInputSchema(CertificateCreationSchema): organization = fields.String( missing=lambda: current_app.config.get("LEMUR_DEFAULT_ORGANIZATION") ) - location = fields.String( - missing=lambda: current_app.config.get("LEMUR_DEFAULT_LOCATION") - ) + location = fields.String() country = fields.String( missing=lambda: current_app.config.get("LEMUR_DEFAULT_COUNTRY") ) diff --git a/lemur/static/app/angular/authorities/authority/distinguishedName.tpl.html b/lemur/static/app/angular/authorities/authority/distinguishedName.tpl.html index 1303f200..e94f856e 100644 --- a/lemur/static/app/angular/authorities/authority/distinguishedName.tpl.html +++ b/lemur/static/app/angular/authorities/authority/distinguishedName.tpl.html @@ -26,8 +26,7 @@ Location
- -

You must enter a location

+
- -

You must enter a - location

+