Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dispatch/auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/data/alert/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AlertBase(DispatchBase):


class AlertCreate(AlertBase):
id: PrimaryKey | None
id: PrimaryKey | None = None


class AlertUpdate(AlertBase):
Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/email_templates/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class EmailTemplatesBase(DispatchBase):


class EmailTemplatesCreate(EmailTemplatesBase):
project: ProjectRead | None
project: ProjectRead | None = None


class EmailTemplatesUpdate(EmailTemplatesBase):
Expand Down
4 changes: 2 additions & 2 deletions src/dispatch/entity/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/entity_type/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class EntityTypeBase(DispatchBase):


class EntityTypeCreate(EntityTypeBase):
id: PrimaryKey | None
id: PrimaryKey | None = None
project: ProjectRead


Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/notification/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class NotificationBase(EvergreenBase):


class NotificationCreate(NotificationBase):
filters: list[SearchFilterRead | None]
filters: list[SearchFilterRead | None] = None
project: ProjectRead


Expand Down
4 changes: 2 additions & 2 deletions src/dispatch/plugin/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading