From c5edbd9f9302c6288d236dff5f62c5f1cfe35981 Mon Sep 17 00:00:00 2001 From: stumpylog <797416+stumpylog@users.noreply.github.com> Date: Mon, 31 Aug 2026 15:17:30 -0700 Subject: [PATCH] Docs: link the tag-batching workaround to the upstream DRF issue/PR so it's removable once that lands --- src/documents/serialisers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py index f07d245bf..74b82de7b 100644 --- a/src/documents/serialisers.py +++ b/src/documents/serialisers.py @@ -756,6 +756,13 @@ class _BatchingTagsRelatedField(serializers.ManyRelatedField): falling back to the child relation's normal (query-per-item) validation for anything that isn't a plausible int pk, so bad input still gets the usual DRF validation error rather than being silently dropped. + + This is a known upstream DRF limitation, not something paperless-specific: + https://github.com/encode/django-rest-framework/issues/9607, with a fix + (https://github.com/encode/django-rest-framework/pull/9984) open but + stalled as of 2026-08. If that lands, this class and the many_init() + override on TagsField below can be deleted in favor of plain + `PrimaryKeyRelatedField(many=True)`. """ @staticmethod