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

Fix user can be born in the future (#327) #329

Closed e-n-0 closed 3 years ago

codecov[bot] commented 3 years ago

Codecov Report

Merging #329 (ea3913b) into master (a96f0c8) will decrease coverage by 0.01%. The diff coverage is 11.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #329      +/-   ##
==========================================
- Coverage   51.43%   51.42%   -0.02%     
==========================================
  Files         198      197       -1     
  Lines        9680     9640      -40     
==========================================
- Hits         4979     4957      -22     
+ Misses       4701     4683      -18     
Impacted Files Coverage Δ
prologin/users/forms.py 53.50% <11.11%> (-3.10%) :arrow_down:
prologin/contest/views.py 38.70% <0.00%> (-0.58%) :arrow_down:
prologin/homepage/views.py 28.26% <0.00%> (-0.32%) :arrow_down:
prologin/contest/event_wishes_override.py
prologin/contest/forms.py 43.82% <0.00%> (+0.20%) :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 a96f0c8...ea3913b. Read the comment docs.

Elfikurr commented 3 years ago

I believe that clean() should raise a ValidationError when encountering an error ? Especially if there is only one error, else we should use add_error() instead of self.error_class, if I'm reading the docs (badum tss) correctly.

Nhqml commented 3 years ago

IMO, the use of validators as suggested by @lportemo is a cleaner way to achieve our goal. It will also be more consistent if we decide to implement more validations steps in the future.

I believe we should instead focus on #331. Feel free to reopen this if you disagree.