Merge branch 'dev' into feature-bulk-edit-cf-values
This commit is contained in:
commit
160a6e77b5
2
Pipfile
2
Pipfile
@ -7,7 +7,7 @@ name = "pypi"
|
|||||||
dateparser = "~=1.2"
|
dateparser = "~=1.2"
|
||||||
# WARNING: django does not use semver.
|
# WARNING: django does not use semver.
|
||||||
# Only patch versions are guaranteed to not introduce breaking changes.
|
# 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-allauth = {extras = ["mfa", "socialaccount"], version = "*"}
|
||||||
django-auditlog = "*"
|
django-auditlog = "*"
|
||||||
django-celery-results = "*"
|
django-celery-results = "*"
|
||||||
|
8
Pipfile.lock
generated
8
Pipfile.lock
generated
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"hash": {
|
"hash": {
|
||||||
"sha256": "a194c6834fba6a14712ba36eb0b896f18d7ef4393523e5d55ccb103104e99ddb"
|
"sha256": "3f2f37d0a7229998ac58bee3144c18a2d91802bc44c6bd64533ab477b5d637c6"
|
||||||
},
|
},
|
||||||
"pipfile-spec": 6,
|
"pipfile-spec": 6,
|
||||||
"requires": {},
|
"requires": {},
|
||||||
@ -515,12 +515,12 @@
|
|||||||
},
|
},
|
||||||
"django": {
|
"django": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:8b38a9a12da3ae00cb0ba72da985ec4b14de6345046b1e174b1fd7254398f818",
|
"sha256:236e023f021f5ce7dee5779de7b286565fdea5f4ab86bae5338e3f7b69896cf0",
|
||||||
"sha256:c0fa0e619c39325a169208caef234f90baa925227032ad3f44842ba14d75234a"
|
"sha256:de450c09e91879fa5a307f696e57c851955c910a438a35e6b4c895e86bedc82a"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"markers": "python_version >= '3.10'",
|
"markers": "python_version >= '3.10'",
|
||||||
"version": "==5.1.3"
|
"version": "==5.1.4"
|
||||||
},
|
},
|
||||||
"django-allauth": {
|
"django-allauth": {
|
||||||
"extras": [
|
"extras": [
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<i-bs name="eye"></i-bs>
|
<i-bs name="eye"></i-bs>
|
||||||
</pngx-preview-popup>
|
</pngx-preview-popup>
|
||||||
</td>
|
</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">
|
<td scope="row">
|
||||||
<div class="btn-group d-block d-sm-none">
|
<div class="btn-group d-block d-sm-none">
|
||||||
<div ngbDropdown container="body" class="d-inline-block">
|
<div ngbDropdown container="body" class="d-inline-block">
|
||||||
|
@ -321,6 +321,8 @@ def update_document_content_maybe_archive_file(document_id):
|
|||||||
|
|
||||||
@shared_task
|
@shared_task
|
||||||
def empty_trash(doc_ids=None):
|
def empty_trash(doc_ids=None):
|
||||||
|
if doc_ids is None:
|
||||||
|
logger.info("Emptying trash of all expired documents")
|
||||||
documents = (
|
documents = (
|
||||||
Document.deleted_objects.filter(id__in=doc_ids)
|
Document.deleted_objects.filter(id__in=doc_ids)
|
||||||
if doc_ids is not None
|
if doc_ids is not None
|
||||||
@ -337,6 +339,7 @@ def empty_trash(doc_ids=None):
|
|||||||
# Temporarily connect the cleanup handler
|
# Temporarily connect the cleanup handler
|
||||||
models.signals.post_delete.connect(cleanup_document_deletion, sender=Document)
|
models.signals.post_delete.connect(cleanup_document_deletion, sender=Document)
|
||||||
documents.delete() # this is effectively a hard delete
|
documents.delete() # this is effectively a hard delete
|
||||||
|
logger.info(f"Deleted {len(deleted_document_ids)} documents from trash")
|
||||||
|
|
||||||
if settings.AUDIT_LOG_ENABLED:
|
if settings.AUDIT_LOG_ENABLED:
|
||||||
# Delete the audit log entries for documents that dont exist anymore
|
# Delete the audit log entries for documents that dont exist anymore
|
||||||
|
Loading…
x
Reference in New Issue
Block a user