pyronear / pyro-api

Alert Management API for wildfire prevention, detection & monitoring. Built with FastAPI & PostgreSQL
Apache License 2.0
21 stars 9 forks source link

fix: Fixed media registration inconsistency #187

Closed frgfm closed 3 years ago

frgfm commented 3 years ago

This PR fixes an inconsistency in check_media_registration which was either returning a dict or a MediaOut. I have no clue why the bug hasn't come up until now, but I deployed it on Heroku, created a device, a media, uploaded a media and fetched the URL without any issue with this PR :+1:

Any feedback is welcome!

fe51 commented 3 years ago

It's quite curious indeed .. Thank you for your reactivity ! It is okay to me !

codecov[bot] commented 3 years ago

Codecov Report

Merging #187 (8ad764f) into master (ed6bcff) will increase coverage by 0.07%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #187      +/-   ##
==========================================
+ Coverage   91.13%   91.21%   +0.07%     
==========================================
  Files          34       34              
  Lines        1230     1229       -1     
==========================================
  Hits         1121     1121              
+ Misses        109      108       -1     
Flag Coverage Δ
unittests 91.21% <100.00%> (+0.07%) :arrow_up:

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

Impacted Files Coverage Δ
src/app/api/routes/media.py 84.72% <100.00%> (+1.16%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ed6bcff...8ad764f. Read the comment docs.