prologin / concours-site

Source code of the Prologin contest website
https://gitlab.com/prologin/concours/site
GNU General Public License v3.0
10 stars 6 forks source link

dev_admin_contestant_fix: fix contestant count that was glitching #347

Closed TheoHollender closed 2 years ago

TheoHollender commented 3 years ago

Fix of issue #286.

The problem was only half fixed, it seemed to come from a little bit after the annotations of the queryset, it seemed like the last annotated value would overwrite every precedent but apparently it isn't, see #346.

codecov[bot] commented 3 years ago

Codecov Report

Merging #347 (8c8abaa) into master (4da0c9d) will increase coverage by 0.10%. The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
+ Coverage   51.45%   51.56%   +0.10%     
==========================================
  Files         197      202       +5     
  Lines        9632     9647      +15     
==========================================
+ Hits         4956     4974      +18     
+ Misses       4676     4673       -3     
Impacted Files Coverage Δ
prologin/prologin/utils/db.py 67.50% <83.33%> (+1.71%) :arrow_up:
prologin/users/models.py 68.06% <0.00%> (-2.22%) :arrow_down:
prologin/users/admin.py 100.00% <0.00%> (ø)
prologin/users/tests.py 100.00% <0.00%> (ø)
prologin/users/oidc_scopes.py
prologin/users/oidc_authz.py
...ologin/users/migrations/0007_openidclientpolicy.py
prologin/oidc_policy/admin.py 100.00% <0.00%> (ø)
prologin/oidc_policy/oidc_scopes.py 0.00% <0.00%> (ø)
prologin/oidc_policy/tests.py 100.00% <0.00%> (ø)
... and 7 more

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 4da0c9d...8c8abaa. Read the comment docs.

TheoHollender commented 3 years ago

The problem was from the db.py cause a local variable was beeing overwritten while beeing usefull to a function #346

cyril-amar commented 2 years ago

Can this be merged? It would participate to close #286 and #346.

juli0z commented 2 years ago

Migrated to https://gitlab.com/prologin/concours/site/-/merge_requests/347