Loading src/rpc/methods.py +2 −10 Original line number Diff line number Diff line Loading @@ -1163,10 +1163,8 @@ def advanced_search( if fetch_resources: # Search Resources first resources_set = ( Resource.objects.filter(ptr_project=project, deleted_at__isnull=True) .select_related("file", "file__project", "file__file_type") .prefetch_related("tags", "file__tags") resources_set = Resource.objects.filter( ptr_project=project, deleted_at__isnull=True ) if collection_id: resources_set = resources_set.filter( Loading Loading @@ -1228,12 +1226,6 @@ def advanced_search( ) serializer_cache = SerializerCache() results["resources_count"] = resources_set.distinct().count() if include_metas: resources_set = resources_set.prefetch_related( "file__metadataresourcevalue_set", "file__metadataresourcevalue_set__metadata", "file__metadataresourcevalue_set__metadata__set", ) for resource_instance in ( resources_set.annotate( title_binary=Cast("title", output_field=BinaryField()) Loading Loading
src/rpc/methods.py +2 −10 Original line number Diff line number Diff line Loading @@ -1163,10 +1163,8 @@ def advanced_search( if fetch_resources: # Search Resources first resources_set = ( Resource.objects.filter(ptr_project=project, deleted_at__isnull=True) .select_related("file", "file__project", "file__file_type") .prefetch_related("tags", "file__tags") resources_set = Resource.objects.filter( ptr_project=project, deleted_at__isnull=True ) if collection_id: resources_set = resources_set.filter( Loading Loading @@ -1228,12 +1226,6 @@ def advanced_search( ) serializer_cache = SerializerCache() results["resources_count"] = resources_set.distinct().count() if include_metas: resources_set = resources_set.prefetch_related( "file__metadataresourcevalue_set", "file__metadataresourcevalue_set__metadata", "file__metadataresourcevalue_set__metadata__set", ) for resource_instance in ( resources_set.annotate( title_binary=Cast("title", output_field=BinaryField()) Loading