codeforboston / codeforboston/police-data-trust
[BUG] Officer Creation does not require a data source
Open
backend
bug
- Dominant language
- Python
- Stars
- 64
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
It should not be possible to create a Data node in the index without attaching a source. However, the current implementation of the Officer POST endpoint allows just that.
**To Reproduce**
Steps to reproduce the behavior:
POST - Officer without a valid source UID.
**Expected behavior**
The API should pass a 422 response
**Additional context**
When a valid source UID IS included, make sure to attach the officer to that source.
Alternatively, the correct source could be inferred from the logged in user.
Contributor guide
Assessment
This issue has not been assessed yet.