mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-02 14:28:14 -06:00
Compare commits
1 Commits
fix-11679
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8655f8792 |
@@ -11,17 +11,17 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/cdk": "^20.2.13",
|
||||
"@angular/common": "~20.3.15",
|
||||
"@angular/compiler": "~20.3.15",
|
||||
"@angular/core": "~20.3.15",
|
||||
"@angular/forms": "~20.3.15",
|
||||
"@angular/localize": "~20.3.15",
|
||||
"@angular/platform-browser": "~20.3.15",
|
||||
"@angular/platform-browser-dynamic": "~20.3.15",
|
||||
"@angular/router": "~20.3.15",
|
||||
"@ng-bootstrap/ng-bootstrap": "^19.0.1",
|
||||
"@ng-select/ng-select": "^20.7.0",
|
||||
"@angular/cdk": "^21.0.5",
|
||||
"@angular/common": "~21.0.6",
|
||||
"@angular/compiler": "~21.0.6",
|
||||
"@angular/core": "~21.0.6",
|
||||
"@angular/forms": "~21.0.6",
|
||||
"@angular/localize": "~21.0.6",
|
||||
"@angular/platform-browser": "~21.0.6",
|
||||
"@angular/platform-browser-dynamic": "~21.0.6",
|
||||
"@angular/router": "~21.0.6",
|
||||
"@ng-bootstrap/ng-bootstrap": "^20.0.0",
|
||||
"@ng-select/ng-select": "^21.1.3",
|
||||
"@ngneat/dirty-check-forms": "^3.0.3",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"bootstrap": "^5.3.8",
|
||||
@@ -30,8 +30,8 @@
|
||||
"ng2-pdf-viewer": "^10.4.0",
|
||||
"ngx-bootstrap-icons": "^1.9.3",
|
||||
"ngx-color": "^10.1.0",
|
||||
"ngx-cookie-service": "^20.1.1",
|
||||
"ngx-device-detector": "^10.1.0",
|
||||
"ngx-cookie-service": "^21.1.0",
|
||||
"ngx-device-detector": "^11.0.0",
|
||||
"ngx-ui-tour-ng-bootstrap": "^17.0.1",
|
||||
"rxjs": "^7.8.2",
|
||||
"tslib": "^2.8.1",
|
||||
@@ -42,16 +42,16 @@
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "^20.0.0",
|
||||
"@angular-builders/jest": "^20.0.0",
|
||||
"@angular-devkit/core": "^20.3.13",
|
||||
"@angular-devkit/schematics": "^20.3.13",
|
||||
"@angular-eslint/builder": "20.6.0",
|
||||
"@angular-eslint/eslint-plugin": "20.6.0",
|
||||
"@angular-eslint/eslint-plugin-template": "20.6.0",
|
||||
"@angular-eslint/schematics": "20.6.0",
|
||||
"@angular-eslint/template-parser": "20.6.0",
|
||||
"@angular/build": "^20.3.13",
|
||||
"@angular/cli": "~20.3.13",
|
||||
"@angular/compiler-cli": "~20.3.15",
|
||||
"@angular-devkit/core": "^21.0.4",
|
||||
"@angular-devkit/schematics": "^21.0.4",
|
||||
"@angular-eslint/builder": "21.1.0",
|
||||
"@angular-eslint/eslint-plugin": "21.1.0",
|
||||
"@angular-eslint/eslint-plugin-template": "21.1.0",
|
||||
"@angular-eslint/schematics": "21.1.0",
|
||||
"@angular-eslint/template-parser": "21.1.0",
|
||||
"@angular/build": "^21.0.4",
|
||||
"@angular/cli": "~21.0.4",
|
||||
"@angular/compiler-cli": "~21.0.6",
|
||||
"@codecov/webpack-plugin": "^1.9.1",
|
||||
"@playwright/test": "^1.57.0",
|
||||
"@types/jest": "^30.0.0",
|
||||
|
||||
3337
src-ui/pnpm-lock.yaml
generated
3337
src-ui/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,6 @@ from pikepdf import Page
|
||||
from pikepdf import PasswordError
|
||||
from pikepdf import Pdf
|
||||
|
||||
from documents.consumer import ConsumerPreflightPlugin
|
||||
from documents.converters import convert_from_tiff_to_pdf
|
||||
from documents.data_models import ConsumableDocument
|
||||
from documents.data_models import DocumentMetadataOverrides
|
||||
@@ -194,15 +193,6 @@ class BarcodePlugin(ConsumeTaskPlugin):
|
||||
):
|
||||
logger.info(f"Found ASN in barcode: {located_asn}")
|
||||
self.metadata.asn = located_asn
|
||||
# (Re-)run the preflight ASN check
|
||||
preflight_plugin = ConsumerPreflightPlugin(
|
||||
input_doc=self.input_doc,
|
||||
metadata=self.metadata,
|
||||
status_mgr=self.status_mgr,
|
||||
base_tmp_dir=self.base_tmp_dir,
|
||||
task_id=self.task_id,
|
||||
)
|
||||
preflight_plugin.pre_check_asn_value()
|
||||
|
||||
def cleanup(self) -> None:
|
||||
self.temp_dir.cleanup()
|
||||
|
||||
@@ -11,7 +11,6 @@ from django.test import override_settings
|
||||
|
||||
from documents import tasks
|
||||
from documents.barcodes import BarcodePlugin
|
||||
from documents.consumer import ConsumerError
|
||||
from documents.data_models import ConsumableDocument
|
||||
from documents.data_models import DocumentMetadataOverrides
|
||||
from documents.data_models import DocumentSource
|
||||
@@ -94,41 +93,6 @@ class TestBarcode(
|
||||
|
||||
self.assertDictEqual(separator_page_numbers, {1: False})
|
||||
|
||||
@override_settings(CONSUMER_ENABLE_ASN_BARCODE=True)
|
||||
def test_asn_barcode_duplicate_in_trash_fails(self):
|
||||
"""
|
||||
GIVEN:
|
||||
- A document with ASN barcode 123 is in the trash
|
||||
WHEN:
|
||||
- A file with the same barcode ASN is consumed
|
||||
THEN:
|
||||
- The ASN check is re-run and consumption fails
|
||||
"""
|
||||
test_file = self.BARCODE_SAMPLE_DIR / "barcode-39-asn-123.pdf"
|
||||
|
||||
first_doc = Document.objects.create(
|
||||
title="First ASN 123",
|
||||
content="",
|
||||
checksum="asn123first",
|
||||
mime_type="application/pdf",
|
||||
archive_serial_number=123,
|
||||
)
|
||||
|
||||
first_doc.delete()
|
||||
|
||||
dupe_asn = settings.SCRATCH_DIR / "barcode-39-asn-123-second.pdf"
|
||||
shutil.copy(test_file, dupe_asn)
|
||||
|
||||
with mock.patch("documents.tasks.ProgressManager", DummyProgressManager):
|
||||
with self.assertRaisesRegex(ConsumerError, r"ASN 123.*trash"):
|
||||
tasks.consume_file(
|
||||
ConsumableDocument(
|
||||
source=DocumentSource.ConsumeFolder,
|
||||
original_file=dupe_asn,
|
||||
),
|
||||
None,
|
||||
)
|
||||
|
||||
@override_settings(
|
||||
CONSUMER_BARCODE_TIFF_SUPPORT=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user