Skip to content

Commit 115adec

Browse files
Fix bug in _translate_keys that affects non-nested parameters
1 parent 7f1dc2b commit 115adec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sparkpost/transmissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _translate_keys(self, **kwargs):
6262
if from_key in model:
6363
to_model = model
6464
to_key = model_remap[from_key]
65-
if to_key.index('/'):
65+
if '/' in to_key:
6666
# Nested within a dict
6767
into_list = to_key.split('/')
6868
to_key = into_list[-1]

0 commit comments

Comments
 (0)