mirror of
https://github.com/netbox-community/netbox.git
synced 2026-05-06 22:12:43 +08:00
Closes #21875: Allow subclasses of dict for API_TOKEN_PEPPERS
This commit is contained in:
committed by
Jeremy Stretch
parent
75e1b86613
commit
660ca42149
@@ -9,7 +9,7 @@ def validate_peppers(peppers):
|
||||
"""
|
||||
Validate the given dictionary of cryptographic peppers for type & sufficient length.
|
||||
"""
|
||||
if type(peppers) is not dict:
|
||||
if not isinstance(peppers, dict):
|
||||
raise ImproperlyConfigured("API_TOKEN_PEPPERS must be a dictionary.")
|
||||
for key, pepper in peppers.items():
|
||||
if type(key) is not int:
|
||||
|
||||
Reference in New Issue
Block a user