mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +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:
@@ -304,8 +304,7 @@ def prepare_activation_url(email: str, request: HttpRequest,
|
||||
prereg_user = create_preregistration_user(email, request, realm_creation)
|
||||
|
||||
if streams is not None:
|
||||
prereg_user.streams = streams
|
||||
prereg_user.save()
|
||||
prereg_user.streams.set(streams)
|
||||
|
||||
confirmation_type = Confirmation.USER_REGISTRATION
|
||||
if realm_creation:
|
||||
|
||||
Reference in New Issue
Block a user