mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Cleaning things up, trying to get tests to work.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from app.models import BRANDING_TYPES
|
||||
from app.enums import BrandType
|
||||
|
||||
post_create_email_branding_schema = {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
@@ -9,7 +9,7 @@ post_create_email_branding_schema = {
|
||||
"name": {"type": "string"},
|
||||
"text": {"type": ["string", "null"]},
|
||||
"logo": {"type": ["string", "null"]},
|
||||
"brand_type": {"enum": BRANDING_TYPES},
|
||||
"brand_type": {"enum": [e.value for e in BrandType]},
|
||||
},
|
||||
"required": ["name"],
|
||||
}
|
||||
@@ -23,7 +23,7 @@ post_update_email_branding_schema = {
|
||||
"name": {"type": ["string", "null"]},
|
||||
"text": {"type": ["string", "null"]},
|
||||
"logo": {"type": ["string", "null"]},
|
||||
"brand_type": {"enum": BRANDING_TYPES},
|
||||
"brand_type": {"enum": [e.value for e in BrandType]},
|
||||
},
|
||||
"required": [],
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ from marshmallow import (
|
||||
validates,
|
||||
validates_schema,
|
||||
)
|
||||
from marshmallow_sqlalchemy import field_for
|
||||
from marshmallow_sqlalchemy import auto_field, field_for
|
||||
from notifications_utils.recipients import (
|
||||
InvalidEmailError,
|
||||
InvalidPhoneError,
|
||||
@@ -464,7 +464,7 @@ class JobSchema(BaseSchema):
|
||||
processing_started = FlexibleDateTime()
|
||||
processing_finished = FlexibleDateTime()
|
||||
|
||||
job_status = field_for(models.JobStatus, "name", required=False)
|
||||
job_status = auto_field()
|
||||
|
||||
scheduled_for = FlexibleDateTime()
|
||||
service_name = fields.Nested(
|
||||
|
||||
Reference in New Issue
Block a user