Skip to content

Commit

Permalink
Allow comparing rating to None
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Feb 23, 2024
1 parent fcb8aa3 commit 6dbd994
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plextraktsync/util/Rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ def __eq__(self, other):
if isinstance(other, (int, float)):
return self.rating == int(other)

if other is None:
return False

return self.rating == other.rating

def __str__(self):
Expand Down

0 comments on commit 6dbd994

Please sign in to comment.