mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-26 08:12:34 -04:00 
			
		
		
		
	Put imports at the top
This commit is contained in:
		
							parent
							
								
									b3624f6375
								
							
						
					
					
						commit
						d37aabfb06
					
				| @ -1,3 +1,5 @@ | |||||||
|  | import textwrap | ||||||
|  | 
 | ||||||
| from django.conf import settings | from django.conf import settings | ||||||
| from django.core.checks import Error, register | from django.core.checks import Error, register | ||||||
| from django.db.utils import OperationalError | from django.db.utils import OperationalError | ||||||
| @ -16,13 +18,14 @@ def changed_password_check(app_configs, **kwargs): | |||||||
|         return []  # No documents table yet |         return []  # No documents table yet | ||||||
| 
 | 
 | ||||||
|     if encrypted_doc: |     if encrypted_doc: | ||||||
|  | 
 | ||||||
|         if not settings.PASSPHRASE: |         if not settings.PASSPHRASE: | ||||||
|             return [Error( |             return [Error( | ||||||
|                 "The database contains encrypted documents but no password " |                 "The database contains encrypted documents but no password " | ||||||
|                 "is set." |                 "is set." | ||||||
|             )] |             )] | ||||||
|         elif not GnuPG.decrypted(encrypted_doc.source_file): | 
 | ||||||
|             import textwrap |         if not GnuPG.decrypted(encrypted_doc.source_file): | ||||||
|             return [Error(textwrap.dedent( |             return [Error(textwrap.dedent( | ||||||
|                 """ |                 """ | ||||||
|                 The current password doesn't match the password of the |                 The current password doesn't match the password of the | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user