Skip to content

Commit 3f4c53a

Browse files
authored
Merge pull request #5 from cloudshiftstrategies/fix/children_contains_parent
fix(product): MinProduct.children sometimes included parent
2 parents d8e0d41 + 925e262 commit 3f4c53a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

channel_advisor_api/models/channel_advisor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def get_first_image_url(cls, id: str) -> str | None:
209209

210210
@property
211211
def children(self) -> List["MinProduct"]:
212-
return self.all(filter=f"ParentProductID eq {self.id}")
212+
return self.all(filter=f"ParentProductID eq {self.id} and IsParent ne true")
213213

214214
@property
215215
def child_ids(self) -> List[int]:

0 commit comments

Comments
 (0)