Squashed commit of the following:

commit 52909e8117
Author: smilerz <smilerz@gmail.com>
Date:   Wed Sep 6 15:54:23 2023 -0500

    fix recipe counting issue on extended mixin
This commit is contained in:
smilerz
2023-09-12 09:48:41 -05:00
parent d467352029
commit 1b97472368
2 changed files with 3 additions and 6 deletions

View File

@@ -56,8 +56,7 @@ class ExtendedRecipeMixin(serializers.ModelSerializer):
api_serializer = None
# extended values are computationally expensive and not needed in normal circumstances
try:
if str2bool(
self.context['request'].query_params.get('extended', False)) and self.__class__ == api_serializer:
if str2bool(self.context['request'].query_params.get('extended', False)) and self.__class__ == api_serializer:
return fields
except (AttributeError, KeyError):
pass