mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 16:46:50 +01:00
only import dateparser when required
This commit is contained in:
parent
c330cca2c9
commit
416101d557
1 changed files with 2 additions and 1 deletions
|
|
@ -6,7 +6,6 @@ import shutil
|
|||
import subprocess
|
||||
import tempfile
|
||||
|
||||
import dateparser
|
||||
import magic
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
|
|
@ -200,6 +199,8 @@ def parse_date(filename, text):
|
|||
"""
|
||||
Call dateparser.parse with a particular date ordering
|
||||
"""
|
||||
import dateparser
|
||||
|
||||
return dateparser.parse(
|
||||
ds,
|
||||
settings={
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue