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

Fixed labels order #3987

Merged
merged 5 commits into from
Dec 8, 2021
Merged

Fixed labels order #3987

merged 5 commits into from
Dec 8, 2021

Conversation

ActiveChooN
Copy link
Contributor

@ActiveChooN ActiveChooN commented Dec 6, 2021

Motivation and context

External bug report

How has this been tested?

No tests, due to no issue reproduction on development setup.

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

@@ -79,6 +79,7 @@ class LabelSerializer(serializers.ModelSerializer):
class Meta:
model = models.Label
fields = ('id', 'name', 'color', 'attributes', 'deleted')
ordering = ['-id']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a link on documentation about the field? I can see such parameter for Django Models: https://docs.djangoproject.com/en/3.2/ref/models/options/#ordering

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or may be on the DRF source code. Because in IAM PR I deleted all such fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could not find any reference. So, moved to custom prefetching of related fields.

CHANGELOG.md Outdated Show resolved Hide resolved
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