Skip to content

Commit

Permalink
Fix: 签到插件求签事件 FortuneEvent 对 eq 和 hash 的判断
Browse files Browse the repository at this point in the history
- 修复签到插件求签事件 FortuneEvent 对 eq 和 hash 的判断
  • Loading branch information
Ailitonia committed Nov 30, 2022
1 parent 20f549a commit 59a0de7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions omega_miya/plugins/omega_sign_in/fortune.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ class FortuneEvent(BaseModel):

def __eq__(self, other) -> bool:
if isinstance(other, FortuneEvent):
return self.name == other.name
return self.name == other.name and self.good == other.good and self.bad == other.bad
else:
return False

def __hash__(self) -> int:
return hash(self.name)
return hash(self.name + self.good + self.bad)


__fortune_event: list[FortuneEvent] = []
Expand Down

0 comments on commit 59a0de7

Please sign in to comment.