removed most of the logic that extracts data from filename patterns #156

This commit is contained in:
jonaswinkler
2020-12-20 00:08:05 +01:00
parent 32224f187d
commit 7f9a0204b5
3 changed files with 4 additions and 281 deletions

View File

@@ -247,7 +247,6 @@ class Consumer(LoggingMixin):
with open(self.path, "rb") as f:
document = Document.objects.create(
correspondent=file_info.correspondent,
title=(self.override_title or file_info.title)[:127],
content=text,
mime_type=mime_type,
@@ -257,12 +256,6 @@ class Consumer(LoggingMixin):
storage_type=storage_type
)
relevant_tags = set(file_info.tags)
if relevant_tags:
tag_names = ", ".join([t.name for t in relevant_tags])
self.log("debug", "Tagging with {}".format(tag_names))
document.tags.add(*relevant_tags)
self.apply_overrides(document)
document.save()