diff --git a/src/dispatch/auth/models.py b/src/dispatch/auth/models.py index 68092be34840..8249cb76fd32 100644 --- a/src/dispatch/auth/models.py +++ b/src/dispatch/auth/models.py @@ -265,8 +265,8 @@ class UserCreate(DispatchBase): email: EmailStr password: str | None = None - projects: list[UserProject] | None - organizations: list[UserOrganization] | None + projects: list[UserProject] | None = None + organizations: list[UserOrganization] | None = None role: str | None = None @field_validator("password", mode="before") diff --git a/src/dispatch/data/alert/models.py b/src/dispatch/data/alert/models.py index 19a98ac1dc62..5f01d8a1c876 100644 --- a/src/dispatch/data/alert/models.py +++ b/src/dispatch/data/alert/models.py @@ -26,7 +26,7 @@ class AlertBase(DispatchBase): class AlertCreate(AlertBase): - id: PrimaryKey | None + id: PrimaryKey | None = None class AlertUpdate(AlertBase): diff --git a/src/dispatch/email_templates/models.py b/src/dispatch/email_templates/models.py index d5d75217a5ae..05fe3a1c232c 100644 --- a/src/dispatch/email_templates/models.py +++ b/src/dispatch/email_templates/models.py @@ -27,7 +27,7 @@ class EmailTemplatesBase(DispatchBase): class EmailTemplatesCreate(EmailTemplatesBase): - project: ProjectRead | None + project: ProjectRead | None = None class EmailTemplatesUpdate(EmailTemplatesBase): diff --git a/src/dispatch/entity/models.py b/src/dispatch/entity/models.py index 39cac0b05e05..92e474e36248 100644 --- a/src/dispatch/entity/models.py +++ b/src/dispatch/entity/models.py @@ -57,7 +57,7 @@ class EntityCreate(EntityBase): def __hash__(self): return hash((self.id, self.value)) - id: PrimaryKey | None + id: PrimaryKey | None = None entity_type: EntityTypeCreate project: ProjectRead @@ -79,7 +79,7 @@ class EntityReadMinimal(DispatchBase): source: str | None = None value: str | None = None description: str | None = None - entity_type: EntityTypeReadMinimal | None + entity_type: EntityTypeReadMinimal | None = None class EntityPagination(Pagination): diff --git a/src/dispatch/entity_type/models.py b/src/dispatch/entity_type/models.py index 925db27f40a9..8a1636e10696 100644 --- a/src/dispatch/entity_type/models.py +++ b/src/dispatch/entity_type/models.py @@ -64,7 +64,7 @@ class EntityTypeBase(DispatchBase): class EntityTypeCreate(EntityTypeBase): - id: PrimaryKey | None + id: PrimaryKey | None = None project: ProjectRead diff --git a/src/dispatch/notification/models.py b/src/dispatch/notification/models.py index 5717ce79ef20..5d7088028ac2 100644 --- a/src/dispatch/notification/models.py +++ b/src/dispatch/notification/models.py @@ -67,7 +67,7 @@ class NotificationBase(EvergreenBase): class NotificationCreate(NotificationBase): - filters: list[SearchFilterRead | None] + filters: list[SearchFilterRead | None] = None project: ProjectRead diff --git a/src/dispatch/plugin/models.py b/src/dispatch/plugin/models.py index 3008ab5e54f8..599decc4b55b 100644 --- a/src/dispatch/plugin/models.py +++ b/src/dispatch/plugin/models.py @@ -209,8 +209,8 @@ class PluginInstanceReadMinimal(PluginBase): class PluginInstanceCreate(PluginBase): - enabled: bool | None - configuration: dict | None + enabled: bool | None = None + configuration: dict | None = None plugin: PluginRead project: ProjectRead