mirror of
https://github.com/suitenumerique/docs.git
synced 2026-08-17 21:25:43 +02:00
🐛(backend) fix UnorderedObjectListWarning for DocumentAskForAccess
In the tests there is a UnorderedObjectListWarning, we also find this same warning in the logs in production. This warning appears because the queryset used by the DocumentAskForAccess paginator is not ordered and can lead to inconsistent result. Ordering the queryset fix this warning.
This commit is contained in:
@@ -35,6 +35,7 @@ and this project adheres to
|
||||
- 🐛(frontend) fix toolbar blocknote hidden #2373
|
||||
- 🐛(frontend) fix application crashes when using GTranslate and zoom #2372
|
||||
- 🐛(frontend) fix emoji pdf not matching #2375
|
||||
- 🐛(backend) fix UnorderedObjectListWarning for DocumentAskForAccess viewset
|
||||
|
||||
## [v5.1.0] - 2026-05-11
|
||||
|
||||
|
||||
@@ -2943,7 +2943,7 @@ class DocumentAskForAccessViewSet(
|
||||
permissions.ResourceWithAccessPermission,
|
||||
]
|
||||
throttle_scope = "document_ask_for_access"
|
||||
queryset = models.DocumentAskForAccess.objects.all()
|
||||
queryset = models.DocumentAskForAccess.objects.all().order_by("updated_at")
|
||||
serializer_class = serializers.DocumentAskForAccessSerializer
|
||||
_document = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user