get the items with a specific attribute from the bundle

This commit is contained in:
Adrian Manteza
2022-03-22 20:32:25 +00:00
parent a61c7a82b9
commit aaa672c14c
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ class Item(BaseModel):
return attribute.value
return False
def attribute_exists(self, ref_attribute):
def attribute_exists(self, ref_attribute: Attribute) -> bool:
for attribute in self.attributes:
if attribute.id == ref_attribute.id and attribute.value.lower(
) == ref_attribute.value.lower():