Skip to content

Commit

Permalink
Cleaner field mapping for path variable handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Nov 10, 2023
1 parent 0bf5b04 commit 5c9e1c3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/falconpy/_util/_uber.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,13 @@ def scrub_target(oper: str, scrubbed: str, kwas: dict) -> str:
"querySensorUpdateKernelsDistinct": "distinct_field",
"ListObjects": "collection_name",
"SearchObjects": "collection_name",
"GetObject": "collection_name~object_key",
"PutObject": "collection_name~object_key",
"DeleteObject": "collection_name~object_key",
"GetObjectMetadata": "collection_name~object_key"
"GetObject": ["collection_name", "object_key"],
"PutObject": ["collection_name", "object_key"],
"DeleteObject": ["collection_name", "object_key"],
"GetObjectMetadata": ["collection_name", "object_key"]
}
for field_value, field_name in field_mapping.items():
for field_value, field_names in field_mapping.items():
if oper == field_value: # Only perform replacements on mapped operation IDs.
field_names = field_name.split("~")
if len(field_names) == 1:
scrubbed = handle_field(scrubbed, kwas, field_names[0])
else:
Expand Down

0 comments on commit 5c9e1c3

Please sign in to comment.