From 3e11363572cf7206b92f17194291eb2e8ea2d0ab Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Wed, 1 Nov 2023 23:33:22 +0000 Subject: [PATCH] better string comparison: == not is --- sysexecution/order_stacks/contract_order_stack.py | 2 +- sysexecution/order_stacks/instrument_order_stack.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysexecution/order_stacks/contract_order_stack.py b/sysexecution/order_stacks/contract_order_stack.py index 8573c6505d..77d27d1e3f 100644 --- a/sysexecution/order_stacks/contract_order_stack.py +++ b/sysexecution/order_stacks/contract_order_stack.py @@ -87,7 +87,7 @@ def list_of_orders_with_instrument_code(self, instrument_code: str) -> list: list_of_orders = [ order for order in list_of_orders - if order.instrument_code is instrument_code + if order.instrument_code == instrument_code ] return list_of_orders diff --git a/sysexecution/order_stacks/instrument_order_stack.py b/sysexecution/order_stacks/instrument_order_stack.py index 7cb007c54d..0b44ff7255 100644 --- a/sysexecution/order_stacks/instrument_order_stack.py +++ b/sysexecution/order_stacks/instrument_order_stack.py @@ -19,7 +19,7 @@ def list_of_orders_with_instrument_code(self, instrument_code: str) -> list: list_of_orders = [ order for order in list_of_orders - if order.instrument_code is instrument_code + if order.instrument_code == instrument_code ] return list_of_orders