Skip to content

Commit

Permalink
revisit BomRef
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck committed Dec 5, 2023
1 parent 8eb7786 commit 1fe7cae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cyclonedx/model/bom_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def value(self, value: Optional[str]) -> None:

def __eq__(self, other: object) -> bool:
if isinstance(other, BomRef):
return str(other) == str(self)
return other._value == self._value
return False

def __lt__(self, other: Any) -> bool:
Expand All @@ -57,4 +57,7 @@ def __repr__(self) -> str:
return f'<BomRef {self._value!r}>'

def __str__(self) -> str:
return self.value or ''
return self._value or ''

def __bool__(self) -> bool:
return self._value is not None

0 comments on commit 1fe7cae

Please sign in to comment.