actions: Add assertion for invalid flag operations.

This commit is contained in:
Tim Abbott
2017-08-25 00:34:56 -07:00
parent 35f1bbb968
commit f3c73e4aa4

View File

@@ -2715,6 +2715,8 @@ def do_update_message_flags(user_profile, operation, flag, messages):
count = msgs.update(flags=F('flags').bitor(flagattr))
elif operation == 'remove':
count = msgs.update(flags=F('flags').bitand(~flagattr))
else:
raise AssertionError("Invalid message flags operation")
event = {'type': 'update_message_flags',
'operation': operation,