def get_entities(self, data):
        """Return serialized list of entity objects on data that user has `view` permission on."""
        entities = self._filter_queryset('view_entity', data.entity_set.all())

        from .entity import EntitySerializer

        class EntityWithoutDataSerializer(WithoutDataSerializerMixin, EntitySerializer):
            """Entity without data field serializer."""

        return self._serialize_items(EntityWithoutDataSerializer, 'entities', entities)
def get_entities ( self , data ) : entities = self . _filter_queryset ( 'view_entity' , data . entity_set . all ( ) ) from . entity import EntitySerializer class EntityWithoutDataSerializer ( WithoutDataSerializerMixin , EntitySerializer ) : return self . _serialize_items ( EntityWithoutDataSerializer , 'entities' , entities )
Return serialized list of entity objects on data that user has `view` permission on.