Skip to content

Commit 5ed28a2

Browse files
Restrict env var values
1 parent c7f6acc commit 5ed28a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shotgun_api3/shotgun.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4472,11 +4472,11 @@ def _translate_filters_simple(sg_filter):
44724472

44734473
# Payload optimization: Do not send a full object
44744474
# just send the `type` and `id` when combining related queries
4475-
enable_entity_optimization = os.environ.get(
4475+
enable_entity_optimization_value = os.environ.get(
44764476
"SHOTGUN_API_ENABLE_ENTITY_OPTIMIZATION", "0"
44774477
).strip().lower()
44784478
if (
4479-
enable_entity_optimization not in ["0", "no", "false"]
4479+
enable_entity_optimization_value == "1"
44804480
and condition["path"] != "id"
44814481
and condition["relation"] in ["is", "is_not"]
44824482
and isinstance(values[0], dict)

0 commit comments

Comments
 (0)