Skip to content

Commit

Permalink
Implement hash interface for Alias objects.
Browse files Browse the repository at this point in the history
Fixes #2025
  • Loading branch information
coleifer committed Sep 24, 2019
1 parent ac95547 commit 8fc5a64
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions peewee.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,9 @@ def __init__(self, node, alias):
super(Alias, self).__init__(node)
self._alias = alias

def __hash__(self):
return hash(self._alias)

def alias(self, alias=None):
if alias is None:
return self.node
Expand Down

0 comments on commit 8fc5a64

Please sign in to comment.