New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort search results, images, and attachments. #712

Merged
merged 1 commit into from Nov 7, 2017

Conversation

Projects
None yet
2 participants
@floemker
Contributor

floemker commented Nov 7, 2017

When providing a list of results these results should be sorted to give
consistent results. Order search results and images by the time they
were changed and attachments by there name.

This fixes the Django 1.11

UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class '...'> QuerySet.

warning.

Sort search results, images, and attachments.
When providing a list of results these results should be sorted to give
consistent results. Order search results and images by the time they
were changed and attachments by there name. This fixes the Django 1.11
UnorderedObjectListWarning.
@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Nov 7, 2017

Codecov Report

Merging #712 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #712      +/-   ##
==========================================
- Coverage   70.01%   69.94%   -0.07%     
==========================================
  Files          89       89              
  Lines        4422     4422              
==========================================
- Hits         3096     3093       -3     
- Misses       1326     1329       +3
Impacted Files Coverage Δ
src/wiki/views/article.py 65.55% <100%> (ø) ⬆️
src/wiki/plugins/attachments/views.py 59% <100%> (ø) ⬆️
src/wiki/plugins/images/views.py 47% <100%> (ø) ⬆️
src/wiki/plugins/attachments/models.py 82.64% <0%> (-2.48%) ⬇️

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 afefd8e...f656638. Read the comment docs.

codecov bot commented Nov 7, 2017

Codecov Report

Merging #712 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #712      +/-   ##
==========================================
- Coverage   70.01%   69.94%   -0.07%     
==========================================
  Files          89       89              
  Lines        4422     4422              
==========================================
- Hits         3096     3093       -3     
- Misses       1326     1329       +3
Impacted Files Coverage Δ
src/wiki/views/article.py 65.55% <100%> (ø) ⬆️
src/wiki/plugins/attachments/views.py 59% <100%> (ø) ⬆️
src/wiki/plugins/images/views.py 47% <100%> (ø) ⬆️
src/wiki/plugins/attachments/models.py 82.64% <0%> (-2.48%) ⬇️

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 afefd8e...f656638. Read the comment docs.

@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Nov 7, 2017

Member

Thanks for this improvement, makes total sense!

Member

benjaoming commented Nov 7, 2017

Thanks for this improvement, makes total sense!

@benjaoming benjaoming merged commit dc4354b into django-wiki:master Nov 7, 2017

3 checks passed

codecov/patch 100% of diff hit (target 70.01%)
Details
codecov/project Absolute coverage decreased by -0.06% but relative coverage increased by +29.98% compared to afefd8e
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@floemker floemker deleted the floemker:sorting branch Nov 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment