Clean up unnecessary UserMessage.flags_dict().

(imported from commit ece196da6c98db3bcc7079e8d44b557b3aac0edb)
This commit is contained in:
Tim Abbott 2013-06-25 14:05:13 -04:00
parent d6e04ce2d6
commit c4dc0afbf3
1 changed files with 1 additions and 4 deletions

View File

@ -405,14 +405,11 @@ class UserMessage(models.Model):
def __repr__(self): def __repr__(self):
display_recipient = get_display_recipient(self.message.recipient) display_recipient = get_display_recipient(self.message.recipient)
return (u"<UserMessage: %s / %s (%s)>" % (display_recipient, self.user_profile.email, self.flags_dict())).encode("utf-8") return (u"<UserMessage: %s / %s (%s)>" % (display_recipient, self.user_profile.email, self.flags_list())).encode("utf-8")
def flags_list(self): def flags_list(self):
return [flag for flag in self.flags.keys() if getattr(self.flags, flag).is_set] return [flag for flag in self.flags.keys() if getattr(self.flags, flag).is_set]
def flags_dict(self):
return dict(flags = [self.flags_list()])
def parse_usermessage_flags(val): def parse_usermessage_flags(val):
flags = [] flags = []
mask = 1 mask = 1