From 1775846483006ba740f00f7ff008565997297a98 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 13 Mar 2026 23:51:54 -0700 Subject: [PATCH] Dont allow these ones to get all --- src/documents/serialisers.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py index b1c2239d8..c2eefb68a 100644 --- a/src/documents/serialisers.py +++ b/src/documents/serialisers.py @@ -1990,6 +1990,19 @@ class BulkEditSerializer( raise serializers.ValidationError("password must be a string") def validate(self, attrs): + attrs = super().validate(attrs) + + if attrs.get("all", False) and attrs["method"] in [ + bulk_edit.merge, + bulk_edit.split, + bulk_edit.delete_pages, + bulk_edit.edit_pdf, + bulk_edit.remove_password, + ]: + raise serializers.ValidationError( + "This method does not support all=true.", + ) + method = attrs["method"] parameters = attrs["parameters"]