CTFd
CTFd copied to clipboard
Fix the order of the solves of the user pages to the chronological ordering (latest first).
Problem: When one looks at a user page, the list of the solves is in a seemingly random order.
Solution suggested: This small PR fixes that ordering by sorting the solves in reverse chronological order (latest solve first).
I feel like it was written to be ordered in date descending but it is possible that that functionality was lost somewhere.
Codecov Report
Merging #2108 (a59bd84) into master (d89ac57) will not change coverage. The diff coverage is
100.00%.
:exclamation: Current head a59bd84 differs from pull request most recent head f9563bc. Consider uploading reports for the commit f9563bc to get more accurate results
@@ Coverage Diff @@
## master #2108 +/- ##
=======================================
Coverage 87.73% 87.73%
=======================================
Files 131 131
Lines 7433 7433
=======================================
Hits 6521 6521
Misses 912 912
| Impacted Files | Coverage Δ | |
|---|---|---|
| CTFd/models/__init__.py | 96.71% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Possible yes. I have a fork of CTFd, and without the ordering fixed (asc or desc, as you prefer), the order appears somewhat random. I feel like even if it's already sorted in this original repo, there is no harm in re-sorting just in case some plugins modify it.