diff --git a/lemur/schemas.py b/lemur/schemas.py index 7a5e62cc..bbc5fd0a 100644 --- a/lemur/schemas.py +++ b/lemur/schemas.py @@ -35,6 +35,9 @@ def validate_options(options): interval = get_plugin_option('interval', options) unit = get_plugin_option('unit', options) + if not interval and not unit: + return + if interval == 'month': unit *= 30 diff --git a/lemur/tests/test_authorities.py b/lemur/tests/test_authorities.py index 164f033b..6b2f86b2 100644 --- a/lemur/tests/test_authorities.py +++ b/lemur/tests/test_authorities.py @@ -13,7 +13,7 @@ def test_authority_input_schema(client, role): 'owner': 'jim@example.com', 'description': 'An example authority.', 'commonName': 'AnExampleAuthority', - 'pluginName': {'slug': 'verisign-issuer'}, + 'plugin': {'slug': 'verisign-issuer', 'plugin_options': [{'name': 'test', 'value': 'blah'}]}, 'type': 'root', 'signingAlgorithm': 'sha256WithRSA', 'keyType': 'RSA2048',