Merge branch 'dev' into feature-bulk-edit-cf-values

This commit is contained in:
shamoon 2024-12-08 10:37:16 -08:00
commit 160a6e77b5
4 changed files with 9 additions and 6 deletions

View File

@ -7,7 +7,7 @@ name = "pypi"
dateparser = "~=1.2"
# WARNING: django does not use semver.
# Only patch versions are guaranteed to not introduce breaking changes.
django = "~=5.1.3"
django = "~=5.1.4"
django-allauth = {extras = ["mfa", "socialaccount"], version = "*"}
django-auditlog = "*"
django-celery-results = "*"

8
Pipfile.lock generated
View File

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "a194c6834fba6a14712ba36eb0b896f18d7ef4393523e5d55ccb103104e99ddb"
"sha256": "3f2f37d0a7229998ac58bee3144c18a2d91802bc44c6bd64533ab477b5d637c6"
},
"pipfile-spec": 6,
"requires": {},
@ -515,12 +515,12 @@
},
"django": {
"hashes": [
"sha256:8b38a9a12da3ae00cb0ba72da985ec4b14de6345046b1e174b1fd7254398f818",
"sha256:c0fa0e619c39325a169208caef234f90baa925227032ad3f44842ba14d75234a"
"sha256:236e023f021f5ce7dee5779de7b286565fdea5f4ab86bae5338e3f7b69896cf0",
"sha256:de450c09e91879fa5a307f696e57c851955c910a438a35e6b4c895e86bedc82a"
],
"index": "pypi",
"markers": "python_version >= '3.10'",
"version": "==5.1.3"
"version": "==5.1.4"
},
"django-allauth": {
"extras": [

View File

@ -60,7 +60,7 @@
<i-bs name="eye"></i-bs>
</pngx-preview-popup>
</td>
<td scope="row" i18n>{{ getDaysRemaining(document) }} days</td>
<td scope="row" class="d-none d-sm-table-cell" i18n>{{ getDaysRemaining(document) }} days</td>
<td scope="row">
<div class="btn-group d-block d-sm-none">
<div ngbDropdown container="body" class="d-inline-block">

View File

@ -321,6 +321,8 @@ def update_document_content_maybe_archive_file(document_id):
@shared_task
def empty_trash(doc_ids=None):
if doc_ids is None:
logger.info("Emptying trash of all expired documents")
documents = (
Document.deleted_objects.filter(id__in=doc_ids)
if doc_ids is not None
@ -337,6 +339,7 @@ def empty_trash(doc_ids=None):
# Temporarily connect the cleanup handler
models.signals.post_delete.connect(cleanup_document_deletion, sender=Document)
documents.delete() # this is effectively a hard delete
logger.info(f"Deleted {len(deleted_document_ids)} documents from trash")
if settings.AUDIT_LOG_ENABLED:
# Delete the audit log entries for documents that dont exist anymore