From 1c006686bb9ef92acbcd968da85b7f8236042513 Mon Sep 17 00:00:00 2001 From: Will Giddens Date: Tue, 28 Feb 2023 22:51:36 -0500 Subject: [PATCH] Don't edit the orignal django-filters schema. --- drf_spectacular/contrib/django_filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drf_spectacular/contrib/django_filters.py b/drf_spectacular/contrib/django_filters.py index d2d80b98..6d4578be 100644 --- a/drf_spectacular/contrib/django_filters.py +++ b/drf_spectacular/contrib/django_filters.py @@ -96,7 +96,7 @@ def resolve_filter_field(self, auto_schema, model, filterset_class, field_name, schema = build_basic_type(annotation) else: # allow injecting raw schema via @extend_schema_field decorator - schema = annotation + schema = annotation.copy() elif filter_method_hint is not _NoHint: if is_basic_type(filter_method_hint): schema = build_basic_type(filter_method_hint)