Upload files to "/"
This commit is contained in:
parent
295b9d22a7
commit
13c5f21f58
@ -117,7 +117,9 @@ SCORE_TO_CODE_MAP = {
|
||||
|
||||
|
||||
def safe_get(d, *keys):
|
||||
"""Attempts both snake_case and camelCase keys."""
|
||||
"""Attempts both snake_case and camelCase keys in a dict, handles None safely."""
|
||||
if not isinstance(d, dict):
|
||||
return {}
|
||||
for key in keys:
|
||||
if key in d:
|
||||
return d[key]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user