mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
django: Bump version to 1.11.5.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# and requirements/prod_lock.txt.
|
||||
# See requirements/README.md for more detail.
|
||||
# Django itself; we use a slightly patched version
|
||||
Django==1.11.4
|
||||
Django==1.11.5
|
||||
|
||||
# needed for mypy TypedDict
|
||||
mypy_extensions==0.3.0
|
||||
|
||||
@@ -50,7 +50,7 @@ django-bitfield==1.9.3
|
||||
django-pipeline==1.6.13
|
||||
django-statsd-mozilla==0.4.0
|
||||
django-webpack-loader==0.5.0
|
||||
django==1.11.4
|
||||
django==1.11.5
|
||||
docopt==0.6.2
|
||||
docutils==0.14
|
||||
first==2.0.1 # via pip-tools
|
||||
|
||||
@@ -35,7 +35,7 @@ django-bitfield==1.9.3
|
||||
django-pipeline==1.6.13
|
||||
django-statsd-mozilla==0.4.0
|
||||
django-webpack-loader==0.5.0
|
||||
django==1.11.4
|
||||
django==1.11.5
|
||||
docopt==0.6.2
|
||||
gitdb==0.6.4
|
||||
google-api-python-client==1.6.3
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
ZULIP_VERSION = "1.6.0+git"
|
||||
PROVISION_VERSION = '10.1'
|
||||
PROVISION_VERSION = '10.2'
|
||||
|
||||
@@ -154,15 +154,14 @@ def make_raw(query, exclude=None):
|
||||
for instance in query:
|
||||
data = model_to_dict(instance, exclude=exclude)
|
||||
"""
|
||||
In Django 1.10, model_to_dict resolves ManyToManyField as a QuerySet.
|
||||
Previously, we used to get primary keys. Following code converts the
|
||||
QuerySet into primary keys.
|
||||
For reference: https://www.mail-archive.com/django-updates@googlegroups.com/msg163020.html
|
||||
In Django 1.11.5, model_to_dict evaluates the QuerySet of
|
||||
many-to-many field to give us a list of instances. We require
|
||||
a list of primary keys, so we get the primary keys from the
|
||||
instances below.
|
||||
"""
|
||||
for field in instance._meta.many_to_many:
|
||||
value = data[field.name]
|
||||
if isinstance(value, QuerySet):
|
||||
data[field.name] = [row.pk for row in value]
|
||||
data[field.name] = [row.id for row in value]
|
||||
|
||||
rows.append(data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user