-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 pagination in some endpoints #5557
Conversation
0d827a8
to
fbcc345
Compare
@zhiltsov-max , @bsekachev , could you please look at tests? |
…zm/improve-some-endpoints
dimension = serializers.CharField(max_length=2, source='segment.task.dimension') | ||
labels = LabelSerializer(many=True, source='get_labels') | ||
assignee = BasicUserSerializer(allow_null=True, read_only=True) | ||
dimension = serializers.CharField(max_length=2, source='segment.task.dimension', read_only=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhiltsov-max , why do we need read_only=True here if below read_only_fields is specified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, the fields marked with read_only=True
are "required" in the generated schema otherwise, even though they are mentioned in Meta.read_only_fields
. I suspect this is because they are overridden, note that the other fields have the ReadOnlyField
type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's wait tests.
- Added missing pagination or page parameters in `/projects/{id}/tasks`, `/tasks/{id}/jobs`, `/jobs/{id}/issues`, `/jobs/{id}/commits`, `/issues/{id}/comments`, `/organizations` - Updated SDK, tests and UI
Motivation and context
/projects/{id}/tasks
,/tasks/{id}/jobs
,/jobs/{id}/issues
,/jobs/{id}/commits
,/issues/{id}/comments
,/organizations
How has this been tested?
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.