mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 23:35:22 +01:00
Put imports at the top
This commit is contained in:
parent
b3624f6375
commit
d37aabfb06
1 changed files with 5 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import textwrap
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.checks import Error, register
|
||||
from django.db.utils import OperationalError
|
||||
|
|
@ -16,13 +18,14 @@ def changed_password_check(app_configs, **kwargs):
|
|||
return [] # No documents table yet
|
||||
|
||||
if encrypted_doc:
|
||||
|
||||
if not settings.PASSPHRASE:
|
||||
return [Error(
|
||||
"The database contains encrypted documents but no password "
|
||||
"is set."
|
||||
)]
|
||||
elif not GnuPG.decrypted(encrypted_doc.source_file):
|
||||
import textwrap
|
||||
|
||||
if not GnuPG.decrypted(encrypted_doc.source_file):
|
||||
return [Error(textwrap.dedent(
|
||||
"""
|
||||
The current password doesn't match the password of the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue