@@ -65,16 +65,15 @@ class CreatureViewSet(EagerLoadingMixin, viewsets.ReadOnlyModelViewSet):
6565    queryset  =  models .Creature .objects .all ().order_by ('pk' )
6666    serializer_class  =  serializers .CreatureSerializer 
6767    filterset_class  =  CreatureFilterSet 
68- 
69-     select_related_fields  =  []
7068
7169    prefetch_related_fields  =  [
7270        'actions' ,
7371        'actions__attacks' ,
72+         'actions__attacks__damage_type' ,
73+         'actions__attacks__extra_damage_type' ,
7474        'creaturesets' ,
7575        'condition_immunities' ,
7676        'condition_immunities__icon' ,
77-         'condition_immunities__document' ,
7877        'damage_immunities' ,
7978        'damage_resistances' ,
8079        'damage_vulnerabilities' ,
@@ -85,19 +84,9 @@ class CreatureViewSet(EagerLoadingMixin, viewsets.ReadOnlyModelViewSet):
8584        'languages' ,
8685        'type' ,
8786        'size' ,
88-         'size__document' ,
8987        'traits' ,
9088    ]
9189
92-     def  get_serializer (self , * args , ** kwargs ):
93-         # Ignore `depth` query parameter on this endpoint. It interacts badly 
94-         # with our custom serializers and is no longer necessary on this view 
95-         if  'depth'  in  self .request .query_params :
96-             self .request .query_params ._mutable  =  True 
97-             self .request .query_params .pop ('depth' , None )
98-             self .request .query_params ._mutable  =  False 
99-         return  super ().get_serializer (* args , ** kwargs )
100- 
10190class  CreatureTypeFilterSet (FilterSet ):
10291    class  Meta :
10392        model  =  models .CreatureType 
0 commit comments