From 925e26284ed3c2fa51ebcac5b9fa38e1290dd233 Mon Sep 17 00:00:00 2001 From: Brian Peterson Date: Tue, 25 Mar 2025 16:18:06 -0500 Subject: [PATCH] fix(product): MinProduct.children sometimes included parent --- channel_advisor_api/models/channel_advisor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channel_advisor_api/models/channel_advisor.py b/channel_advisor_api/models/channel_advisor.py index b536396..b6f2b96 100644 --- a/channel_advisor_api/models/channel_advisor.py +++ b/channel_advisor_api/models/channel_advisor.py @@ -209,7 +209,7 @@ def get_first_image_url(cls, id: str) -> str | None: @property def children(self) -> List["MinProduct"]: - return self.all(filter=f"ParentProductID eq {self.id}") + return self.all(filter=f"ParentProductID eq {self.id} and IsParent ne true") @property def child_ids(self) -> List[int]: