Fix: Make customfieldinstance soft delete, fix filepath when deleted (#8067)

This commit is contained in:
shamoon
2024-10-28 07:02:09 -07:00
committed by GitHub
parent 28fdb170bf
commit 79092c27c5
4 changed files with 64 additions and 4 deletions

View File

@@ -710,7 +710,7 @@ class PaperlessTask(models.Model):
return f"Task {self.task_id}"
class Note(models.Model):
class Note(SoftDeleteModel):
note = models.TextField(
_("content"),
blank=True,
@@ -750,7 +750,7 @@ class Note(models.Model):
return self.note
class ShareLink(models.Model):
class ShareLink(SoftDeleteModel):
class FileVersion(models.TextChoices):
ARCHIVE = ("archive", _("Archive"))
ORIGINAL = ("original", _("Original"))
@@ -866,7 +866,7 @@ class CustomField(models.Model):
return f"{self.name} : {self.data_type}"
class CustomFieldInstance(models.Model):
class CustomFieldInstance(SoftDeleteModel):
"""
A single instance of a field, attached to a CustomField for the name and type
and attached to a single Document to be metadata for it