mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-12 00:19:48 +00:00
Merge branch 'dev' into feature-ai
This commit is contained in:
@@ -304,7 +304,7 @@ class BarcodePlugin(ConsumeTaskPlugin):
|
||||
)
|
||||
x, y = page.size
|
||||
page = page.resize(
|
||||
(int(round(x * factor)), (int(round(y * factor)))),
|
||||
(round(x * factor), (round(y * factor))),
|
||||
)
|
||||
|
||||
# Detect barcodes
|
||||
|
@@ -44,7 +44,7 @@ def move_documents_and_create_thumbnails(apps, schema_editor):
|
||||
exist_ok=True,
|
||||
)
|
||||
|
||||
documents: list[str] = os.listdir(Path(settings.MEDIA_ROOT) / "documents")
|
||||
documents: list[str] = os.listdir(Path(settings.MEDIA_ROOT) / "documents") # noqa: PTH208
|
||||
|
||||
if set(documents) == {"originals", "thumbnails"}:
|
||||
return
|
||||
|
@@ -70,7 +70,7 @@ def _convert_thumbnails_to_webp(apps, schema_editor):
|
||||
(existing_thumbnail, converted_thumbnail),
|
||||
)
|
||||
|
||||
if len(work_packages):
|
||||
if work_packages:
|
||||
logger.info(
|
||||
"\n\n"
|
||||
" This is a one-time only migration to convert thumbnails for all of your\n"
|
||||
|
@@ -130,7 +130,7 @@ def _convert_encrypted_thumbnails_to_webp(apps, schema_editor) -> None:
|
||||
(existing_thumbnail, converted_thumbnail, passphrase),
|
||||
)
|
||||
|
||||
if len(work_packages):
|
||||
if work_packages:
|
||||
logger.info(
|
||||
"\n\n"
|
||||
" This is a one-time only migration to convert thumbnails for all of your\n"
|
||||
|
@@ -1750,7 +1750,7 @@ class StoragePathSerializer(MatchingModelSerializer, OwnedObjectSerializer):
|
||||
using it require a rename/move
|
||||
"""
|
||||
doc_ids = [doc.id for doc in instance.documents.all()]
|
||||
if len(doc_ids):
|
||||
if doc_ids:
|
||||
bulk_edit.bulk_update_documents.delay(doc_ids)
|
||||
|
||||
return super().update(instance, validated_data)
|
||||
|
@@ -409,11 +409,9 @@ def check_scheduled_workflows():
|
||||
Check and run all enabled scheduled workflows.
|
||||
|
||||
Scheduled triggers are evaluated based on a target date field (e.g. added, created, modified, or a custom date field),
|
||||
combined with a day offset.
|
||||
|
||||
The offset is mathematically negated resulting in the following behavior:
|
||||
- Positive offsets mean the workflow should trigger BEFORE the specified date (e.g., offset = +7 → trigger 7 days before)
|
||||
- Negative offsets mean the workflow should trigger AFTER the specified date (e.g., offset = -7 → trigger 7 days after)
|
||||
combined with a day offset:
|
||||
- Positive offsets mean the workflow should trigger AFTER the specified date (e.g., offset = +7 → trigger 7 days after)
|
||||
- Negative offsets mean the workflow should trigger BEFORE the specified date (e.g., offset = -7 → trigger 7 days before)
|
||||
|
||||
Once a document satisfies this condition, and recurring/non-recurring constraints are met, the workflow is run.
|
||||
"""
|
||||
|
@@ -2265,7 +2265,7 @@ class StoragePathViewSet(ModelViewSet, PermissionsAwareDocumentCountMixin):
|
||||
# perform the deletion so renaming/moving can happen
|
||||
response = super().destroy(request, *args, **kwargs)
|
||||
|
||||
if len(doc_ids):
|
||||
if doc_ids:
|
||||
bulk_edit.bulk_update_documents.delay(doc_ids)
|
||||
|
||||
return response
|
||||
|
Reference in New Issue
Block a user