mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 01:47:41 +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:
@@ -57,8 +57,7 @@ Create default stream groups which the users can choose during sign up.
|
||||
except DefaultStreamGroup.DoesNotExist:
|
||||
default_stream_group = DefaultStreamGroup.objects.create(
|
||||
name=options["name"], realm=realm, description=options["description"])
|
||||
default_stream_group.streams = streams
|
||||
default_stream_group.save()
|
||||
default_stream_group.streams.set(streams)
|
||||
|
||||
default_stream_groups = DefaultStreamGroup.objects.all()
|
||||
for default_stream_group in default_stream_groups:
|
||||
|
||||
Reference in New Issue
Block a user