A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Fix typo in delimiter
Wolf-Bastian Poettner2bd4eb22924a
diff --git a/src/documents/models.py b/src/documents/models.pyindex 69d508350..19f11336d 100644--- a/src/documents/models.py+++ b/src/documents/models.py@@ -286,21 +286,21 @@ class Document(models.Model):@staticmethoddef many_to_dictionary(field):# Converts ManyToManyField to dictionary by assuming, that field- # entries contain an _ or - which will be used as a delimeter+ # entries contain an _ or - which will be used as a delimitermydictionary = dict()for t in field.all():- # Find delimeter- delimeter = t.name.find('_')+ # Find delimiter+ delimiter = t.name.find('_')- if delimeter is -1:- delimeter = t.name.find('-')+ if delimiter is -1:+ delimiter = t.name.find('-')- if delimeter is -1:+ if delimiter is -1:continue- key = t.name[:delimeter]- value = t.name[delimeter+1:]+ key = t.name[:delimiter]+ value = t.name[delimiter+1:]mydictionary[slugify(key)] = slugify(value)