diff --git a/src/codegen/sdk/core/symbol_groups/collection.py b/src/codegen/sdk/core/symbol_groups/collection.py index dd5207628..62122331f 100644 --- a/src/codegen/sdk/core/symbol_groups/collection.py +++ b/src/codegen/sdk/core/symbol_groups/collection.py @@ -112,7 +112,8 @@ def remove(self, value: Child | None = None, *args, **kwargs) -> None: # For example, let's remove all occurrences of the value instead of just the first one if value is None: super().remove(*args, **kwargs) - value.remove(*args, **kwargs) + else: + value.remove(*args, **kwargs) def _inserts_till(self, max_idx: int | None = None) -> int: """Find the number of pending inserts until max_idx."""