Skip to content

Commit

Permalink
Validate IncidentUpdate's incident_type field against the retrieved i…
Browse files Browse the repository at this point in the history
…ncident type. (#4699)

* Validate IncidentUpdate's incident_type field against the retrieved incident_type.

* Fixes incident_type swap.
  • Loading branch information
metroid-samus authored May 7, 2024
1 parent 9218706 commit 0993a9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dispatch/incident/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def update(*, db_session, incident: Incident, incident_in: IncidentUpdate) -> In
)

# Update total incident reponse cost if incident type has changed.
if incident_in.incident_type.id != incident.incident_type.id:
if incident_type.id != incident.incident_type.id:
incident_cost_service.update_incident_response_cost(
incident_id=incident.id, db_session=db_session
)
Expand Down

0 comments on commit 0993a9b

Please sign in to comment.