Skip to content

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

Restored tagging functionality

Jonas Winklerb347e3347d71
diff --git a/src/documents/consumer.py b/src/documents/consumer.py
old mode 100644
new mode 100755
index 927f92e3e..b50d40a0b
--- a/src/documents/consumer.py
+++ b/src/documents/consumer.py
@@ -221,6 +221,12 @@ class Consumer:
storage_type=self.storage_type
)
+ relevant_tags = set(file_info.tags)
+ if relevant_tags:
+ tag_names = ", ".join([t.slug for t in relevant_tags])
+ self.log("debug", "Tagging with {}".format(tag_names))
+ document.tags.add(*relevant_tags)
+
self._write(document, doc, document.source_path)
self._write(document, thumbnail, document.thumbnail_path)