A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Removes variable which was never set, removed unneeded serializer method
Trenton Holmes398f6e5b0c53
diff --git a/src/documents/serialisers.py b/src/documents/serialisers.pyindex 915b26abc..53f9f644a 100644--- a/src/documents/serialisers.py+++ b/src/documents/serialisers.py@@ -573,10 +573,6 @@ class StoragePathSerializer(MatchingModelSerializer):return path- def create(self, validated_data):- storage_path = StoragePath.objects.create(**validated_data)- return storage_path-class UiSettingsViewSerializer(serializers.ModelSerializer):class Meta:diff --git a/src/documents/tasks.py b/src/documents/tasks.pyindex b27ecd1dd..a33dc4e29 100644--- a/src/documents/tasks.py+++ b/src/documents/tasks.py@@ -93,7 +93,6 @@ def consume_file(else:separators = []document_list = []- converted_tiff = Noneif mime_type == "image/tiff":file_to_process = barcodes.convert_from_tiff_to_pdf(path)@@ -117,13 +116,17 @@ def consume_file(else:newname = Nonebarcodes.save_to_dir(document, newname=newname)+# if we got here, the document was successfully split# and can safely be deleted- if converted_tiff is not None:+ if mime_type == "image/tiff":+ # Remove the TIFF converted to PDF filelogger.debug(f"Deleting file {file_to_process}")os.unlink(file_to_process)+ # Remove the original file (new file is saved above)logger.debug(f"Deleting file {path}")os.unlink(path)+# notify the sender, otherwise the progress bar# in the UI stays stuckpayload = {