do_update_pointer: Fix missing where= declaration.

Fixes a regression introduced in 23246ff816.

However, we'll be shortly removing this feature, since it's legacy
support for an app that no longer is supported.
This commit is contained in:
Tim Abbott
2018-08-10 11:16:06 -07:00
parent 58307f80aa
commit 8ba726d47d

View File

@@ -3549,8 +3549,9 @@ def do_update_pointer(user_profile: UserProfile, client: Client,
# up until the pointer move # up until the pointer move
UserMessage.objects.filter(user_profile=user_profile, UserMessage.objects.filter(user_profile=user_profile,
message__id__gt=prev_pointer, message__id__gt=prev_pointer,
message__id__lte=pointer).extra([UserMessage.where_unread()]) \ message__id__lte=pointer).extra(
.update(flags=F('flags').bitor(UserMessage.flags.read)) where=[UserMessage.where_unread()]).update(
flags=F('flags').bitor(UserMessage.flags.read))
event = dict(type='pointer', pointer=pointer) event = dict(type='pointer', pointer=pointer)
send_event(event, [user_profile.id]) send_event(event, [user_profile.id])