mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
removed some obsolete fields from the document model
This commit is contained in:
parent
f8f100781e
commit
9e4147ac52
@ -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):
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user