warsztatywww / aplikacjawww

Web application for scientific summer school
https://warsztatywww.pl
GNU Affero General Public License v3.0
5 stars 6 forks source link

Refactor count properties to custom managers #623

Closed krzys-h closed 2 years ago

krzys-h commented 2 years ago

This reduces the SQL queries required to load the 'Workshops' view significantly, and helps prevent ORM N+1 problems in the future

Closes #622


This change is Reviewable

codecov[bot] commented 2 years ago

Codecov Report

Merging #623 (93cb956) into master (16337e9) will increase coverage by 0.55%. The diff coverage is 94.73%.

@@            Coverage Diff             @@
##           master     #623      +/-   ##
==========================================
+ Coverage   84.37%   84.92%   +0.55%     
==========================================
  Files          15       15              
  Lines        2451     2461      +10     
==========================================
+ Hits         2068     2090      +22     
+ Misses        383      371      -12     
Impacted Files Coverage Δ
wwwapp/forms.py 96.07% <ø> (ø)
wwwapp/views.py 80.76% <73.33%> (+0.06%) :arrow_up:
wwwapp/models.py 85.25% <100.00%> (+3.01%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.