mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
warn about FIPS mode if the Django version changes
This commit is contained in:
parent
cceac8d907
commit
a3f9c0b012
@ -22,11 +22,21 @@ except ImportError: # pragma: no cover
|
||||
|
||||
|
||||
import hashlib
|
||||
import django
|
||||
from django.utils.encoding import force_bytes
|
||||
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
|
||||
from django.db.backends.base import schema
|
||||
|
||||
|
||||
# This line exists to make sure we don't regress on FIPS support if we
|
||||
# upgrade Django; if you're upgrading Django and see this error,
|
||||
# update the version check below, and confirm that FIPS still works.
|
||||
if django.__version__ != '1.11.16':
|
||||
raise RuntimeError("Django version other than 1.11.16 detected {}. \
|
||||
Subclassing BaseDatabaseSchemaEditor is known to work for Django 1.11.16 \
|
||||
and may not work in newer Django versions.".format(django.__version__))
|
||||
|
||||
|
||||
class FipsBaseDatabaseSchemaEditor(BaseDatabaseSchemaEditor):
|
||||
|
||||
@classmethod
|
||||
|
Loading…
Reference in New Issue
Block a user