Merge pull request #458 from joniw/fix-equality-domain-setting

fix equality check for DomainSetting when "other" is None
This commit is contained in:
Khanh Ngo 2019-02-12 09:05:06 +07:00 committed by GitHub
commit 5b88ec58ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -731,7 +731,7 @@ class DomainSetting(db.Model):
return '<DomainSetting {0} for {1}>'.format(setting, self.domain.name)
def __eq__(self, other):
return self.setting == other.setting
return type(self) == type(other) and self.setting == other.setting
def set(self, value):
try: