harvard-lil / perma

Indelible links
420 stars 71 forks source link

Fixup admin page for link batches #3340

Closed rebeccacremona closed 1 year ago

rebeccacremona commented 1 year ago

Closes https://github.com/harvard-lil/perma/issues/3021.

I also noticed the list view was significantly bogged down because of the counts... which is generally what we are interested in when we use this page. So, I decided to cache the counts on the model.

~This PR is in draft mode because I want to double check the speed of the data migration against a prod-like DB, and I only hours ago deleted my prod-like DB and the dump used to create it because "I didn't need it". 🙄 . Chatting w/ Ben about getting a new one, on any schedule that's convenient for him: this PR is very low-priority.~

I checked the migration against a prod-like database, and it finished in 0.07s. (Which was a useful exercise! Caught a bug!)

codecov[bot] commented 1 year ago

Codecov Report

Merging #3340 (6d183b8) into develop (f32c91c) will decrease coverage by 0.03%. The diff coverage is 50.00%.

@@             Coverage Diff             @@
##           develop    #3340      +/-   ##
===========================================
- Coverage    70.04%   70.01%   -0.03%     
===========================================
  Files           55       55              
  Lines         7040     7030      -10     
===========================================
- Hits          4931     4922       -9     
+ Misses        2109     2108       -1     
Impacted Files Coverage Δ
perma_web/api/views.py 84.56% <20.00%> (-0.61%) :arrow_down:
perma_web/perma/admin.py 86.27% <100.00%> (-0.14%) :arrow_down:
perma_web/perma/models.py 86.32% <100.00%> (+0.01%) :arrow_up:

... and 1 file with indirect coverage changes