From 9db89bac3ecc9cf99b64d6eb4be9ba71c7c0f4ef Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:55:52 -0800 Subject: [PATCH] Just accept document_ids, I dont even remember why I did this --- src/documents/serialisers.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py index b22798762..de5f4d33f 100644 --- a/src/documents/serialisers.py +++ b/src/documents/serialisers.py @@ -2290,7 +2290,6 @@ class ShareLinkBundleSerializer(OwnedObjectSerializer): def create(self, validated_data): document_ids = validated_data.pop("document_ids") expiration_days = validated_data.pop("expiration_days", None) - documents = validated_data.pop("documents", None) validated_data["slug"] = get_random_string(50) if expiration_days: validated_data["expiration"] = timezone.now() + timedelta( @@ -2301,15 +2300,11 @@ class ShareLinkBundleSerializer(OwnedObjectSerializer): share_link_bundle = super().create(validated_data) - if documents is None: - documents = list( - Document.objects.filter(pk__in=document_ids).only( - "pk", - ), - ) - else: - documents = list(documents) - + documents = list( + Document.objects.filter(pk__in=document_ids).only( + "pk", + ), + ) documents_by_id = {doc.pk: doc for doc in documents} missing = [ str(doc_id) for doc_id in document_ids if doc_id not in documents_by_id