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 32c5b85cfa
commit fd8009adbd

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: