django-rest-framework/rest_framework
Susan Dreher 8c3f82fb18 🐛 ManyRelatedField get_value clearing field on partial update
A PATCH to a serializer's non-related CharField was clearing an ancillary StringRelatedField(many=True) field.
The issue appears to be in the ManyRelatedField's get_value method, which was returning a [] instead of empty
when the request data was a MultiDict.

This fix mirrors code in fields.py, class Field, get_value, Ln. 272, which explicitly returns empty on a partial update.

Tests added to demonstrate the issue.
2015-01-27 16:18:51 -05:00
..
authtoken Removed custom python_2_unicode_compatible. Closes #2183 2014-12-04 02:50:25 +01:00
static/rest_framework Fixed display issues with tooltips. 2014-12-08 09:06:52 +07:00
templates/rest_framework Remove ‘/‘ from inside variable block {{ }} 2014-12-23 12:12:22 -08:00
templatetags Removed custom urlparse compat 2014-12-04 15:47:42 +01:00
utils Support assignment in ClassLookupDict 2015-01-23 15:32:21 +00:00
__init__.py Bumped the version to 3.0.3. 2015-01-07 19:11:17 +01:00
authentication.py Removed unused imports, pep8 fixes, typo fixes 2014-12-05 00:29:28 +01:00
compat.py Added DictField and support for HStoreField. 2015-01-23 16:27:23 +00:00
decorators.py @api_view defaults to allowing GET 2014-11-28 15:55:02 +00:00
exceptions.py str() -> six.text_type(). Closes #2290. 2014-12-17 13:39:35 +00:00
fields.py Added DictField and support for HStoreField. 2015-01-23 16:27:23 +00:00
filters.py More spelling tweaks 2014-10-03 09:00:33 +13:00
generics.py Serializer API restrictions. 2014-12-17 14:14:51 +00:00
metadata.py Removed custom StringIO, force_text, smart_text compat 2014-12-04 03:11:42 +01:00
mixins.py PUT as create docs, and move mixin out to external gist 2014-11-03 12:00:19 +00:00
models.py Move models.resolve_model to serializers._resolve_model 2014-01-13 11:47:44 -05:00
negotiation.py request.data attribute 2014-09-26 10:46:52 +01:00
pagination.py Pass init arguments through to serializer from pagination serializer. 2015-01-05 16:20:15 +00:00
parsers.py Pass {} as data to DataAndFiles, as it ends up in a MergeDict 2015-01-23 16:52:24 +00:00
permissions.py Removed unused imports, pep8 fixes, typo fixes 2014-12-05 00:29:28 +01:00
relations.py 🐛 ManyRelatedField get_value clearing field on partial update 2015-01-27 16:18:51 -05:00
renderers.py Do not render HTML output for hidden fields. Closes #2410. 2015-01-21 14:27:51 +00:00
request.py Ensure request.auth is available to response middleware. 2014-12-17 13:22:52 +00:00
response.py More sensible response caching. 2015-01-23 12:56:55 +00:00
reverse.py Use six.text_type instead of str everywhere 2014-10-01 13:09:14 +01:00
routers.py NotImplemented -> NotImplementedError 2015-01-19 14:48:13 +00:00
serializers.py Added DictField and support for HStoreField. 2015-01-23 16:27:23 +00:00
settings.py Ammend docstring to use python2/3 compatible example. 2015-01-08 15:38:27 +00:00
status.py Code linting and added runtests.py 2014-08-19 13:28:07 +01:00
test.py Client.logout() also clears any force_authenticate 2014-12-12 13:13:08 +00:00
throttling.py Fix error when NUM_PROXIES is greater than one 2015-01-12 08:12:24 -04:00
urlpatterns.py Merge branch 'master' into 2.4.0 2013-12-13 16:32:34 +00:00
urls.py Regression for #1810: Test login view renders 2014-09-01 10:07:05 +02:00
validators.py Use unicode internally everywhere for 'repr' 2014-12-15 11:55:17 +00:00
views.py Removed custom StringIO, force_text, smart_text compat 2014-12-04 03:11:42 +01:00
viewsets.py Removed unused imports, pep8 fixes, typo fixes 2014-12-05 00:29:28 +01:00