mirror of
https://github.com/suitenumerique/docs
synced 2026-04-21 13:37:20 +00:00
♻️(backend) do not paginate threads list response
The threads list action was paginated its response. this is not the behavior we want. all threads should be loaded when the document is loaded.
This commit is contained in:
parent
dba762759e
commit
9a1dae4908
3 changed files with 8 additions and 7 deletions
|
|
@ -11,12 +11,13 @@ and this project adheres to
|
|||
- 🚸(frontend) allow opening "@page" links with ctrl/command/middle-mouse click
|
||||
- ✅ E2E - Any instance friendly #2142
|
||||
|
||||
### Changed
|
||||
|
||||
- ♻️(backend) do not paginate threads list response #2186
|
||||
|
||||
### Fixed
|
||||
|
||||
- 🐛(frontend) Fix drop cursor creating columns #2185
|
||||
|
||||
### Fixed
|
||||
|
||||
- 🐛 Fixed side effects between comments and versioning #2183
|
||||
|
||||
## [v4.8.5] - 2026-04-03
|
||||
|
|
|
|||
|
|
@ -2757,7 +2757,7 @@ class ThreadViewSet(
|
|||
"""Thread API: list/create threads and nested comment operations."""
|
||||
|
||||
permission_classes = [permissions.CommentPermission]
|
||||
pagination_class = Pagination
|
||||
pagination_class = None
|
||||
serializer_class = serializers.ThreadSerializer
|
||||
queryset = models.Thread.objects.select_related("creator", "document").filter(
|
||||
resolved=False
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ def test_api_documents_threads_list_public_document_link_role_higher_than_reader
|
|||
f"/api/v1.0/documents/{document.id!s}/threads/",
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert response.json()["count"] == 3
|
||||
assert len(response.json()) == 3
|
||||
|
||||
|
||||
def test_api_documents_threads_list_authenticated_document_anonymous_user():
|
||||
|
|
@ -406,7 +406,7 @@ def test_api_documents_threads_list_authenticated_document(link_role):
|
|||
f"/api/v1.0/documents/{document.id!s}/threads/",
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert response.json()["count"] == 3
|
||||
assert len(response.json()) == 3
|
||||
|
||||
|
||||
def test_api_documents_threads_list_restricted_document_anonymous_user():
|
||||
|
|
@ -473,7 +473,7 @@ def test_api_documents_threads_list_restricted_document_editor(role):
|
|||
f"/api/v1.0/documents/{document.id!s}/threads/",
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert response.json()["count"] == 3
|
||||
assert len(response.json()) == 3
|
||||
|
||||
|
||||
# Retrieve
|
||||
|
|
|
|||
Loading…
Reference in a new issue