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: 4 additions & 0 deletions src/dispatch/incident/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ def create_conversation(incident: Incident, db_session: SessionLocal):

def set_conversation_topic(incident: Incident, db_session: SessionLocal):
"""Sets the conversation topic."""
if not incident.conversation:
log.warning("Conversation topic not sent because incident has no conversation.")
return

conversation_topic = (
f":helmet_with_white_cross: {incident.commander.individual.name}, {incident.commander.team} - "
f"Type: {incident.incident_type.name} - "
Expand Down
4 changes: 4 additions & 0 deletions src/dispatch/incident/messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,10 @@ def send_incident_new_role_assigned_notification(
notification_text = "Incident Notification"
notification_type = MessageType.incident_notification

if not incident.conversation:
log.warning("Incident new role message not sent because incident has no conversation.")
return

plugin = plugin_service.get_active_instance(
db_session=db_session, project_id=incident.project.id, plugin_type="conversation"
)
Expand Down
1 change: 1 addition & 0 deletions src/dispatch/tag/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class TagUpdate(TagBase):
class TagRead(TagBase):
id: int
tag_type: Optional[TagTypeRead]
project: ProjectRead


class TagPagination(DispatchBase):
Expand Down