Skip to content

Commit

Permalink
Uses correct enum when setting resource type for executive report doc…
Browse files Browse the repository at this point in the history
…uments (#1568)
  • Loading branch information
mvilanova committed Aug 20, 2021
1 parent 4a56c9e commit e715944
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/dispatch/messaging/strings.py
Expand Up @@ -146,8 +146,8 @@ class MessageType(DispatchEnum):
DocumentResourceReferenceTypes.conversation: INCIDENT_CONVERSATION_REFERENCE_DOCUMENT_DESCRIPTION,
DocumentResourceReferenceTypes.faq: INCIDENT_FAQ_DOCUMENT_DESCRIPTION,
DocumentResourceTypes.executive: INCIDENT_EXECUTIVE_REPORT_DOCUMENT_DESCRIPTION,
DocumentResourceTypes.review: INCIDENT_REVIEW_DOCUMENT_DESCRIPTION,
DocumentResourceTypes.incident: INCIDENT_INVESTIGATION_DOCUMENT_DESCRIPTION,
DocumentResourceTypes.review: INCIDENT_REVIEW_DOCUMENT_DESCRIPTION,
DocumentResourceTypes.tracking: INCIDENT_INVESTIGATION_SHEET_DESCRIPTION,
}

Expand Down
5 changes: 2 additions & 3 deletions src/dispatch/report/flows.py
Expand Up @@ -4,10 +4,10 @@

from pydantic.error_wrappers import ErrorWrapper, ValidationError

from dispatch.enums import DocumentResourceTemplateTypes
from dispatch.decorators import background_task
from dispatch.document import service as document_service
from dispatch.document.models import DocumentCreate
from dispatch.enums import DocumentResourceTypes
from dispatch.event import service as event_service
from dispatch.exceptions import InvalidConfigurationError
from dispatch.incident import service as incident_service
Expand Down Expand Up @@ -87,7 +87,6 @@ def create_executive_report(
db_session=None,
):
"""Creates an executive report."""

current_date = date.today().strftime("%B %d, %Y")

current_status = executive_report_in.current_status
Expand Down Expand Up @@ -163,7 +162,7 @@ def create_executive_report(
executive_report_document.update(
{
"name": executive_report_document_name,
"resource_type": DocumentResourceTemplateTypes.executive,
"resource_type": DocumentResourceTypes.executive,
}
)

Expand Down
5 changes: 3 additions & 2 deletions src/dispatch/report/scheduled.py
@@ -1,17 +1,18 @@
import logging
from datetime import datetime
from schedule import every
from dispatch.database.core import SessionLocal

from dispatch.database.core import SessionLocal
from dispatch.decorators import scheduled_project_task
from dispatch.incident import service as incident_service
from dispatch.project.models import Project
from dispatch.incident.enums import IncidentStatus
from dispatch.project.models import Project
from dispatch.scheduler import scheduler

from .messaging import send_incident_report_reminder
from .models import ReportTypes


log = logging.getLogger(__name__)


Expand Down

0 comments on commit e715944

Please sign in to comment.