Fix strange issue with ParameterValidator settings

When imported at top-level, `settings` was a Python module, rather than a Django
settings object. Not sure why.
This commit is contained in:
Ben Sturmfels 2024-03-20 14:32:44 +11:00
parent 2b709f61e0
commit d0464e870c
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0

View file

@ -1,10 +1,8 @@
import hashlib import hashlib
from django.conf import settings
class ParameterValidator: class ParameterValidator:
def __init__(self, given_hash_or_params, params_hash_key=None): def __init__(self, given_hash_or_params, params_hash_key=None):
from django.conf import settings
if params_hash_key is None: if params_hash_key is None:
self.given_hash = given_hash_or_params self.given_hash = given_hash_or_params
else: else: