codeforboston / codeforboston/police-data-trust

[BUG] Officer Creation does not require a data source

Open
#507 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.