Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

removed some obsolete fields from the document model

Jonas Winkler9e4147ac5252
diff --git a/src/documents/models.py b/src/documents/models.py
index 68f52864f..ae41c09ac 100755
--- a/src/documents/models.py
+++ b/src/documents/models.py
@@ -208,13 +208,8 @@ class Document(models.Model):
def file_name(self):
return slugify(str(self)) + "." + self.file_type
- @property
- def download_url(self):
- return reverse("fetch", kwargs={"kind": "doc", "pk": self.pk})
-
@property
def thumbnail_path(self):
-
file_name = "{:07}.png".format(self.pk)
if self.storage_type == self.STORAGE_TYPE_GPG:
file_name += ".gpg"
@@ -228,10 +223,6 @@ class Document(models.Model):
def thumbnail_file(self):
return open(self.thumbnail_path, "rb")
- @property
- def thumbnail_url(self):
- return reverse("fetch", kwargs={"kind": "thumb", "pk": self.pk})
-
class Log(models.Model):
diff --git a/src/documents/signals/handlers.py b/src/documents/signals/handlers.py
index fdbc75cc1..5ef67dfce 100755
--- a/src/documents/signals/handlers.py
+++ b/src/documents/signals/handlers.py
@@ -65,8 +65,8 @@ def run_post_consume_script(sender, document, **kwargs):
document.file_name,
document.source_path,
document.thumbnail_path,
- document.download_url,
- document.thumbnail_url,
+ None,
+ None,
str(document.correspondent),
str(",".join(document.tags.all().values_list("slug", flat=True)))
)).wait()