mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Fixes a minor TODO in settings, and enables flake8 for settings.py
This commit is contained in:
@@ -9,6 +9,6 @@ class PaperlessTikaConfig(AppConfig):
|
||||
def ready(self):
|
||||
from documents.signals import document_consumer_declaration
|
||||
|
||||
if settings.PAPERLESS_TIKA_ENABLED:
|
||||
if settings.TIKA_ENABLED:
|
||||
document_consumer_declaration.connect(tika_consumer_declaration)
|
||||
AppConfig.ready(self)
|
||||
|
@@ -27,7 +27,7 @@ class TikaDocumentParser(DocumentParser):
|
||||
)
|
||||
|
||||
def extract_metadata(self, document_path, mime_type):
|
||||
tika_server = settings.PAPERLESS_TIKA_ENDPOINT
|
||||
tika_server = settings.TIKA_ENDPOINT
|
||||
try:
|
||||
parsed = parser.from_file(document_path, tika_server)
|
||||
except Exception as e:
|
||||
@@ -49,7 +49,7 @@ class TikaDocumentParser(DocumentParser):
|
||||
|
||||
def parse(self, document_path, mime_type, file_name=None):
|
||||
self.log("info", f"Sending {document_path} to Tika server")
|
||||
tika_server = settings.PAPERLESS_TIKA_ENDPOINT
|
||||
tika_server = settings.TIKA_ENDPOINT
|
||||
|
||||
try:
|
||||
parsed = parser.from_file(document_path, tika_server)
|
||||
@@ -73,7 +73,7 @@ class TikaDocumentParser(DocumentParser):
|
||||
|
||||
def convert_to_pdf(self, document_path, file_name):
|
||||
pdf_path = os.path.join(self.tempdir, "convert.pdf")
|
||||
gotenberg_server = settings.PAPERLESS_TIKA_GOTENBERG_ENDPOINT
|
||||
gotenberg_server = settings.TIKA_GOTENBERG_ENDPOINT
|
||||
url = gotenberg_server + "/forms/libreoffice/convert"
|
||||
|
||||
self.log("info", f"Converting {document_path} to PDF as {pdf_path}")
|
||||
|
Reference in New Issue
Block a user