"""
.. module: lemur.domains.schemas
    :platform: unix
    :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more
    :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
from marshmallow import fields
from lemur.common.schema import LemurInputSchema, LemurOutputSchema
from lemur.schemas import AssociatedCertificateSchema

# from lemur.certificates.schemas import CertificateNestedOutputSchema


class DomainInputSchema(LemurInputSchema):
    id = fields.Integer()
    name = fields.String(required=True)
    sensitive = fields.Boolean()
    certificates = fields.Nested(AssociatedCertificateSchema, many=True, missing=[])


class DomainOutputSchema(LemurOutputSchema):
    id = fields.Integer()
    name = fields.String()
    sensitive = fields.Boolean()
    # certificates = fields.Nested(CertificateNestedOutputSchema, many=True, missing=[])


class DomainNestedOutputSchema(DomainOutputSchema):
    __envelope__ = False


domain_input_schema = DomainInputSchema()
domain_output_schema = DomainOutputSchema()
domains_output_schema = DomainOutputSchema(many=True)

lemur/domains/schemas.py
"""
.. module: lemur.domains.schemas
    :platform: unix
    :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more
    :license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
from marshmallow import fields
from lemur.common.schema import LemurInputSchema, LemurOutputSchema
from lemur.schemas import AssociatedCertificateSchema

# from lemur.certificates.schemas import CertificateNestedOutputSchema


class DomainInputSchema(LemurInputSchema):
    id = fields.Integer()
    name = fields.String(required=True)
    sensitive = fields.Boolean(missing=False)
    certificates = fields.Nested(AssociatedCertificateSchema, many=True, missing=[])


class DomainOutputSchema(LemurOutputSchema):
    id = fields.Integer()
    name = fields.String()
    sensitive = fields.Boolean()
    # certificates = fields.Nested(CertificateNestedOutputSchema, many=True, missing=[])


class DomainNestedOutputSchema(DomainOutputSchema):
    __envelope__ = False


domain_input_schema = DomainInputSchema()
domain_output_schema = DomainOutputSchema()
domains_output_schema = DomainOutputSchema(many=True)

lemur/domains/schemas.py
diff --git a/lemur/domains/schemas.py b/lemur/domains/schemas.py
index a89d8248be..96e4196759 100644
--- a/lemur/domains/schemas.py
+++ b/lemur/domains/schemas.py
@@ -15,7 +15,7 @@
 class DomainInputSchema(LemurInputSchema):
     id = fields.Integer()
     name = fields.String(required=True)
-    sensitive = fields.Boolean()
+    sensitive = fields.Boolean(missing=False)
     certificates = fields.Nested(AssociatedCertificateSchema, many=True, missing=[])
 
 

Adding domain fails on unselectable "sensitive"
Client side

![screenshot_2017-05-12_11-06-54](https://cloud.githubusercontent.com/assets/445200/25991405/528d417a-3703-11e7-9e6c-d70beb6d38e2.png)


Server side

```
May 12 09:05:48 lemur supervisord: lemur-web [2017-05-12 09:05:48,892] ERROR in schema: 'sensitive'
May 12 09:05:48 lemur supervisord: lemur-web Traceback (most recent call last):
May 12 09:05:48 lemur supervisord: lemur-web   File "/var/www/lemur/lemur/common/schema.py", line 158, in decorated_function
May 12 09:05:48 lemur supervisord: lemur-web     resp = f(*args, **kwargs)
May 12 09:05:48 lemur supervisord: lemur-web   File "/var/www/lemur/lemur/domains/views.py", line 126, in post
May 12 09:05:48 lemur supervisord: lemur-web     return service.create(data['name'], data['sensitive'])
May 12 09:05:48 lemur supervisord: lemur-web KeyError: 'sensitive'
May 12 09:05:48 lemur supervisord: lemur-web
May 12 09:05:48 lemur supervisord: lemur-web 'sensitive'
May 12 09:05:48 lemur supervisord: lemur-web Traceback (most recent call last):
May 12 09:05:48 lemur supervisord: lemur-web   File "/var/www/lemur/lemur/common/schema.py", line 158, in decorated_function
May 12 09:05:48 lemur supervisord: lemur-web     resp = f(*args, **kwargs)
May 12 09:05:48 lemur supervisord: lemur-web   File "/var/www/lemur/lemur/domains/views.py", line 126, in post
May 12 09:05:48 lemur supervisord: lemur-web     return service.create(data['name'], data['sensitive'])
May 12 09:05:48 lemur supervisord: lemur-web KeyError: 'sensitive'
```
