diff --git a/backend/server/adventures/serializers.py b/backend/server/adventures/serializers.py index 3023e04..28e8c62 100644 --- a/backend/server/adventures/serializers.py +++ b/backend/server/adventures/serializers.py @@ -122,16 +122,6 @@ class AdventureSerializer(CustomModelSerializer): return [image for image in serializer.data if image is not None] def validate_collections(self, collections): - """Validate that collections belong to the same user""" - if not collections: - return collections - - user = self.context['request'].user - for collection in collections: - if collection.user_id != user: - raise serializers.ValidationError( - f"Collection '{collection.name}' does not belong to the current user." - ) return collections def validate_category(self, category_data): @@ -409,4 +399,4 @@ class CollectionSerializer(CustomModelSerializer): for user in instance.shared_with.all(): shared_uuids.append(str(user.uuid)) representation['shared_with'] = shared_uuids - return representation \ No newline at end of file + return representation