Skip to content
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

fix values_list fields order #1492

Merged
merged 4 commits into from
Oct 13, 2023
Merged

Conversation

Abdeldjalil-H
Copy link
Contributor

@Abdeldjalil-H Abdeldjalil-H commented Oct 9, 2023

Fix fields order for ValuesListQuery

ValuesListQuery return wrong order list when the number of fields is greater than 10.

Description

Starting from python 3.6, the dicts preserve the order of insertion. So there is no need for sorted method. Moreover, this gives wrong results if you use more than 10 fields, because (10, field) will come before (2, field).

Motivation and Context

How Has This Been Tested?

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

ValuesListQuery return wrong order list when the number of fields is greater than 10.
@long2ice
Copy link
Member

Thanks! Please update changelog.

@long2ice
Copy link
Member

Please again. Thanks!

@long2ice long2ice merged commit 76cfc14 into tortoise:develop Oct 13, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants