OpenOversight
OpenOversight copied to clipboard
Incidents can be linked to officers that don't belong to the incident department
Desired outcome:
- If a user attempts to create an incident for a department, and then selects officers from another department as being involved in that incident, the user will see an error message
Current outcome:
- If a user attempts to create an incident for a department, and then selects officers from another department as being involved in that incident, the incident is created and persisted to the database
Steps to reproduce:
- Log in as admin and navigate to
/incidents
- Create an incident
- Choose a department for the incident
- Select officers that don't work for that department, and link them to the incident
Relevant areas of the codebase:
-
IncidentForm
inmain/forms.py
-
IncidentApi
inmain/views.py