mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	only import dateparser when required
This commit is contained in:
		| @@ -6,7 +6,6 @@ import shutil | |||||||
| import subprocess | import subprocess | ||||||
| import tempfile | import tempfile | ||||||
|  |  | ||||||
| import dateparser |  | ||||||
| import magic | import magic | ||||||
| from django.conf import settings | from django.conf import settings | ||||||
| from django.utils import timezone | from django.utils import timezone | ||||||
| @@ -200,6 +199,8 @@ def parse_date(filename, text): | |||||||
|         """ |         """ | ||||||
|         Call dateparser.parse with a particular date ordering |         Call dateparser.parse with a particular date ordering | ||||||
|         """ |         """ | ||||||
|  |         import dateparser | ||||||
|  |  | ||||||
|         return dateparser.parse( |         return dateparser.parse( | ||||||
|             ds, |             ds, | ||||||
|             settings={ |             settings={ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler