From 991a90dfeb4f6e4f39af604bed353b0c2a49ec31 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 17 Sep 2025 18:31:07 +0200 Subject: [PATCH 1/3] Get the full list of fields on the other methods Right now if I set on detail some fields the other are not available in swagger on the put endpoint as example. This fix the issue showing all the fields. --- turbodrf/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/turbodrf/views.py b/turbodrf/views.py index cf8d62e..e0aa56b 100644 --- a/turbodrf/views.py +++ b/turbodrf/views.py @@ -192,6 +192,9 @@ def get_serializer_class(self): else: fields_to_use = fields + if self.action not in ["list", "detail"]: + fields_to_use = "__all__" + # Store original fields before processing original_fields = ( fields_to_use if isinstance(fields_to_use, list) else fields_to_use From 1c490893e566475fa2ac4c46f05db32d5344f488 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Mon, 22 Sep 2025 16:49:02 +0200 Subject: [PATCH 2/3] Add 'retrieve' action to fields check --- turbodrf/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/turbodrf/views.py b/turbodrf/views.py index e0aa56b..f5dabbd 100644 --- a/turbodrf/views.py +++ b/turbodrf/views.py @@ -192,7 +192,7 @@ def get_serializer_class(self): else: fields_to_use = fields - if self.action not in ["list", "detail"]: + if self.action not in ["list", "detail", "retrieve"]: fields_to_use = "__all__" # Store original fields before processing From 403bbb1f0934a3928010c213611afe2dc768692d Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Mon, 29 Sep 2025 09:10:26 +0200 Subject: [PATCH 3/3] Update turbodrf/views.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- turbodrf/views.py | 1 - 1 file changed, 1 deletion(-) diff --git a/turbodrf/views.py b/turbodrf/views.py index f5dabbd..e532ff9 100644 --- a/turbodrf/views.py +++ b/turbodrf/views.py @@ -194,7 +194,6 @@ def get_serializer_class(self): if self.action not in ["list", "detail", "retrieve"]: fields_to_use = "__all__" - # Store original fields before processing original_fields = ( fields_to_use if isinstance(fields_to_use, list) else fields_to_use