AndrewIngram / django-extra-views

Django's class-based generic views are awesome, let's have more of them.
MIT License
1.39k stars 172 forks source link

[Django1.11] AttributeError: This QueryDict instance is immutable #156

Closed voidus closed 6 years ago

voidus commented 6 years ago

Quote from the 1.11 release notes[1]

For consistency with non-multipart requests,
MultiPartParser.parse() now leaves request.POST immutable.
If you’re modifying that QueryDict, you must now first copy it, e.g. request.POST.copy().

This is relevant in https://github.com/AndrewIngram/django-extra-views/blob/master/extra_views/formsets.py#L76. I tried running the automated tests with django1.11, but they passed. Changing request.POST to request.POST.copy() fixes my test failure.

[1] https://docs.djangoproject.com/en/2.0/releases/1.11/

voidus commented 6 years ago

I had a quick look, but I don't think I have the time to write a proper test that reproduces the problem. Sorry.

codecov-io commented 6 years ago

Codecov Report

Merging #156 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #156   +/-   ##
=======================================
  Coverage   54.06%   54.06%           
=======================================
  Files           6        6           
  Lines         529      529           
  Branches       62       62           
=======================================
  Hits          286      286           
  Misses        223      223           
  Partials       20       20
Impacted Files Coverage Δ
extra_views/formsets.py 48.17% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 69c7067...9689d66. Read the comment docs.