mirror of https://github.com/zulip/zulip.git
Clean up unnecessary UserMessage.flags_dict().
(imported from commit ece196da6c98db3bcc7079e8d44b557b3aac0edb)
This commit is contained in:
parent
d6e04ce2d6
commit
c4dc0afbf3
|
@ -405,14 +405,11 @@ class UserMessage(models.Model):
|
|||
|
||||
def __repr__(self):
|
||||
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):
|
||||
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):
|
||||
flags = []
|
||||
mask = 1
|
||||
|
|
Loading…
Reference in New Issue