mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
django-2.0: Don't assign directly to Many-to-Many field.
The old pattern of setting the value and then using .save() here has been deprecated. set() also saves the record.
This commit is contained in:
@@ -92,8 +92,7 @@ def maybe_send_to_registration(request: HttpRequest, email: Text, full_name: Tex
|
||||
del request.session["multiuse_object_key"]
|
||||
request.session.modified = True
|
||||
if streams_to_subscribe is not None:
|
||||
prereg_user.streams = streams_to_subscribe
|
||||
prereg_user.save()
|
||||
prereg_user.streams.set(streams_to_subscribe)
|
||||
|
||||
return redirect("".join((
|
||||
create_confirmation_link(prereg_user, request.get_host(), Confirmation.USER_REGISTRATION),
|
||||
|
||||
Reference in New Issue
Block a user