Ensure that is_hidden does not affect equality checks.

This commit is contained in:
Diana Huang
2015-06-16 15:46:23 -04:00
parent 5ceea7a0a9
commit 72a0d19531
2 changed files with 19 additions and 3 deletions

View File

@@ -138,10 +138,8 @@ class CourseTab(object):
# allow tabs without names; if a name is required, its presence was checked in the validator.
name_is_eq = (other.get('name') is None or self.name == other['name'])
is_hidden_eq = self.is_hidden == other.get('is_hidden', False)
# only compare the persisted/serialized members: 'type' and 'name'
return self.type == other.get('type') and name_is_eq and is_hidden_eq
return self.type == other.get('type') and name_is_eq
def __ne__(self, other):
"""