mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	fixes #11 and some server side warnings
This commit is contained in:
		| @@ -59,9 +59,9 @@ export class DocumentDetailComponent implements OnInit { | ||||
|     private documentListViewService: DocumentListViewService) { } | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     this.correspondentService.list().subscribe(result => this.correspondents = result.results) | ||||
|     this.documentTypeService.list().subscribe(result => this.documentTypes = result.results) | ||||
|     this.tagService.list().subscribe(result => this.tags = result.results) | ||||
|     this.correspondentService.list(1,100000).subscribe(result => this.correspondents = result.results) | ||||
|     this.documentTypeService.list(1,100000).subscribe(result => this.documentTypes = result.results) | ||||
|     this.tagService.list(1,100000).subscribe(result => this.tags = result.results) | ||||
|  | ||||
|     this.route.paramMap.subscribe(paramMap => { | ||||
|       this.documentId = +paramMap.get('id') | ||||
|   | ||||
| @@ -52,35 +52,35 @@ class IndexView(TemplateView): | ||||
|  | ||||
| class CorrespondentViewSet(ModelViewSet): | ||||
|     model = Correspondent | ||||
|     queryset = Correspondent.objects.annotate(document_count=Count('documents'), last_correspondence=Max('documents__created')) | ||||
|     queryset = Correspondent.objects.annotate(document_count=Count('documents'), last_correspondence=Max('documents__created')).order_by('name') | ||||
|     serializer_class = CorrespondentSerializer | ||||
|     pagination_class = StandardPagination | ||||
|     permission_classes = (IsAuthenticated,) | ||||
|     filter_backends = (DjangoFilterBackend, OrderingFilter) | ||||
|     filter_class = CorrespondentFilterSet | ||||
|     ordering_fields = ("name", "document_count", "last_correspondence") | ||||
|     ordering_fields = ("name", "matching_algorithm", "match", "document_count", "last_correspondence") | ||||
|  | ||||
|  | ||||
| class TagViewSet(ModelViewSet): | ||||
|     model = Tag | ||||
|     queryset = Tag.objects.annotate(document_count=Count('documents')) | ||||
|     queryset = Tag.objects.annotate(document_count=Count('documents')).order_by('name') | ||||
|     serializer_class = TagSerializer | ||||
|     pagination_class = StandardPagination | ||||
|     permission_classes = (IsAuthenticated,) | ||||
|     filter_backends = (DjangoFilterBackend, OrderingFilter) | ||||
|     filter_class = TagFilterSet | ||||
|     ordering_fields = ("name", "document_count") | ||||
|     ordering_fields = ("name", "matching_algorithm", "match", "document_count") | ||||
|  | ||||
|  | ||||
| class DocumentTypeViewSet(ModelViewSet): | ||||
|     model = DocumentType | ||||
|     queryset = DocumentType.objects.annotate(document_count=Count('documents')) | ||||
|     queryset = DocumentType.objects.annotate(document_count=Count('documents')).order_by('name') | ||||
|     serializer_class = DocumentTypeSerializer | ||||
|     pagination_class = StandardPagination | ||||
|     permission_classes = (IsAuthenticated,) | ||||
|     filter_backends = (DjangoFilterBackend, OrderingFilter) | ||||
|     filter_class = DocumentTypeFilterSet | ||||
|     ordering_fields = ("name", "document_count") | ||||
|     ordering_fields = ("name", "matching_algorithm", "match", "document_count") | ||||
|  | ||||
|  | ||||
| class DocumentViewSet(RetrieveModelMixin, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jonas Winkler
					Jonas Winkler