mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-20 08:38:01 +02:00
✨(frontend) add UI support for reaction limit on comments
Prevent users from adding more reactions once the per-message limit has been exceeded. It Disables reaction buttons when limit is reached Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
This commit is contained in:
@@ -3234,9 +3234,11 @@ class CommentViewSet(
|
||||
permission_classes = [permissions.CommentPermission]
|
||||
pagination_class = Pagination
|
||||
serializer_class = serializers.CommentSerializer
|
||||
queryset = models.Comment.objects.select_related("user").prefetch_related(
|
||||
"reactions__users"
|
||||
).all()
|
||||
queryset = (
|
||||
models.Comment.objects.select_related("user")
|
||||
.prefetch_related("reactions__users")
|
||||
.all()
|
||||
)
|
||||
|
||||
def get_queryset(self):
|
||||
"""Override to filter on related resource."""
|
||||
|
||||
Reference in New Issue
Block a user