pyro-api icon indicating copy to clipboard operation
pyro-api copied to clipboard

Fix fetch unlabeled detections endpoint

Open RonanMorgan opened this issue 1 year ago • 1 comments

When calling the fetch unlabeled detections endpoint with an ADMIN token, the pictures were not found in the S3 because the organisation_id of ADMIN is = 1, while we would like to get all the Detection of all the organization.

So for ADMIN token we should find the organization_id thanks to the Camera.detection_id

RonanMorgan avatar Sep 10 '24 13:09 RonanMorgan

Codecov Report

Attention: Patch coverage is 70.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 84.83%. Comparing base (f737b0d) to head (982c194). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/app/api/api_v1/endpoints/detections.py 80.00% 3 Missing :warning:
src/app/crud/base.py 50.00% 2 Missing :warning:
src/app/api/dependencies.py 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #366      +/-   ##
==========================================
- Coverage   85.51%   84.83%   -0.68%     
==========================================
  Files          35       35              
  Lines         987      996       +9     
==========================================
+ Hits          844      845       +1     
- Misses        143      151       +8     
Flag Coverage Δ
backend 84.35% <70.00%> (-0.72%) :arrow_down:
client 92.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 10 '24 13:09 codecov[bot]