mirror of
https://github.com/Mailu/Mailu.git
synced 2024-12-14 10:53:30 +02:00
Write an equivalence test for domains, fixes #65
(cherry picked from commit 144f427088
)
This commit is contained in:
parent
883afb30cd
commit
c028a3799d
@ -90,6 +90,12 @@ class Domain(Base):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
try:
|
||||||
|
return self.name == other.name
|
||||||
|
except AttributeError:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class Email(Base):
|
class Email(Base):
|
||||||
""" Abstraction for an email address (localpart and domain).
|
""" Abstraction for an email address (localpart and domain).
|
||||||
|
Loading…
Reference in New Issue
Block a user