mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-04 03:27:12 -05:00 
			
		
		
		
	Merge remote-tracking branch 'origin/dev'
This commit is contained in:
		
						commit
						8164840cba
					
				
							
								
								
									
										2
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							@ -500,7 +500,7 @@ jobs:
 | 
			
		||||
      -
 | 
			
		||||
        name: Create Release and Changelog
 | 
			
		||||
        id: create-release
 | 
			
		||||
        uses: paperless-ngx/release-drafter@master
 | 
			
		||||
        uses: release-drafter/release-drafter@v5
 | 
			
		||||
        with:
 | 
			
		||||
          name: Paperless-ngx ${{ steps.get_version.outputs.version }}
 | 
			
		||||
          tag: ${{ steps.get_version.outputs.version }}
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@ ARG PIKEPDF_VERSION
 | 
			
		||||
ARG PSYCOPG2_VERSION
 | 
			
		||||
 | 
			
		||||
FROM ghcr.io/paperless-ngx/paperless-ngx/builder/jbig2enc:${JBIG2ENC_VERSION} as jbig2enc-builder
 | 
			
		||||
FROM ghcr.io/paperless-ngx/paperless-ngx/builder/qpdf:${QPDF_VERSION} as qpdf-builder
 | 
			
		||||
FROM --platform=$BUILDPLATFORM ghcr.io/paperless-ngx/paperless-ngx/builder/qpdf:${QPDF_VERSION} as qpdf-builder
 | 
			
		||||
FROM ghcr.io/paperless-ngx/paperless-ngx/builder/pikepdf:${PIKEPDF_VERSION} as pikepdf-builder
 | 
			
		||||
FROM ghcr.io/paperless-ngx/paperless-ngx/builder/psycopg2:${PSYCOPG2_VERSION} as psycopg2-builder
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@
 | 
			
		||||
ARG REPO="paperless-ngx/paperless-ngx"
 | 
			
		||||
 | 
			
		||||
ARG QPDF_VERSION
 | 
			
		||||
FROM ghcr.io/${REPO}/builder/qpdf:${QPDF_VERSION} as qpdf-builder
 | 
			
		||||
FROM --platform=$BUILDPLATFORM ghcr.io/${REPO}/builder/qpdf:${QPDF_VERSION} as qpdf-builder
 | 
			
		||||
 | 
			
		||||
# This does nothing, except provide a name for a copy below
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -26,7 +26,7 @@
 | 
			
		||||
        </div>
 | 
			
		||||
        <p class="card-text">
 | 
			
		||||
          <span *ngIf="document.__search_hit__ && document.__search_hit__.highlights" [innerHtml]="document.__search_hit__.highlights"></span>
 | 
			
		||||
          <span *ngIf="document.__search_hit__ && document.__search_hit__.comment_highlights">
 | 
			
		||||
          <span *ngIf="document.__search_hit__ && document.__search_hit__.comment_highlights" class="d-block">
 | 
			
		||||
            <svg width="1em" height="1em" fill="currentColor" class="me-2">
 | 
			
		||||
              <use xlink:href="assets/bootstrap-icons.svg#chat-left-text"/>
 | 
			
		||||
            </svg>
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@ export const environment = {
 | 
			
		||||
  apiBaseUrl: document.baseURI + 'api/',
 | 
			
		||||
  apiVersion: '2',
 | 
			
		||||
  appTitle: 'Paperless-ngx',
 | 
			
		||||
  version: '1.12.0',
 | 
			
		||||
  version: '1.12.0-dev',
 | 
			
		||||
  webSocketHost: window.location.host,
 | 
			
		||||
  webSocketProtocol: window.location.protocol == 'https:' ? 'wss:' : 'ws:',
 | 
			
		||||
  webSocketBaseUrl: base_url.pathname + 'ws/',
 | 
			
		||||
 | 
			
		||||
@ -445,6 +445,10 @@ class DocumentViewSet(
 | 
			
		||||
                )
 | 
			
		||||
                c.save()
 | 
			
		||||
 | 
			
		||||
                from documents import index
 | 
			
		||||
 | 
			
		||||
                index.add_or_update_document(self.get_object())
 | 
			
		||||
 | 
			
		||||
                return Response(self.getComments(doc))
 | 
			
		||||
            except Exception as e:
 | 
			
		||||
                logger.warning(f"An error occurred saving comment: {str(e)}")
 | 
			
		||||
@ -456,6 +460,11 @@ class DocumentViewSet(
 | 
			
		||||
        elif request.method == "DELETE":
 | 
			
		||||
            comment = Comment.objects.get(id=int(request.GET.get("id")))
 | 
			
		||||
            comment.delete()
 | 
			
		||||
 | 
			
		||||
            from documents import index
 | 
			
		||||
 | 
			
		||||
            index.add_or_update_document(self.get_object())
 | 
			
		||||
 | 
			
		||||
            return Response(self.getComments(doc))
 | 
			
		||||
 | 
			
		||||
        return Response(
 | 
			
		||||
@ -468,6 +477,8 @@ class DocumentViewSet(
 | 
			
		||||
class SearchResultSerializer(DocumentSerializer):
 | 
			
		||||
    def to_representation(self, instance):
 | 
			
		||||
        doc = Document.objects.get(id=instance["id"])
 | 
			
		||||
        comments = ""
 | 
			
		||||
        if hasattr(instance.results.q, "subqueries"):
 | 
			
		||||
            commentTerm = instance.results.q.subqueries[0]
 | 
			
		||||
            comments = ",".join(
 | 
			
		||||
                [
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user