for name, field_instance in fields:
field_type_name = field_instance.__class__.__name__
logger.debug(
f'{" " * indentation} Field "{name}", type: {field_type_name}, src: "{field_instance.source}"'
)
# We potentially need to recurse deeper
if isinstance(field_instance, (BaseSerializer, RelatedField, ManyRelatedField)) \
and not isinstance(field_instance, HyperlinkedIdentityField):
# ...
Serializer:
class EngineUpdateSerializer(HispaSerializerMixin, serializers.ModelSerializer):
url = serializers.HyperlinkedIdentityField(view_name='web_contents:engineupdate-detail')
config = SimpleEngineConfigSerializer()
first_update = SimpleEngineUpdateSerializer()
parent = SimpleEngineUpdateSerializer()
class Meta:
model = EngineUpdate
Exception:
select_related is "*" in prefetch:
Workaround: ignore HyperlinkedIdentityField fields:
Serializer: