Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2079 closed defect (fixed)

FileFields AddManipulator gives error in deepcopy

Reported by: daniel.tietze@… Owned by: adrian
Component: Core (Other) Version: magic-removal
Severity: major Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

After updating to revision 3070, image uploading suddenly stopped working.

Here's my code:

  manipulator = Picture.AddManipulator() 
  new_data = request.POST.copy()    # **
  new_data.update(request.FILES) 
  manipulator.do_html2python(new_data) 
  picture = manipulator.save(new_data)    

This breaks in the line marked with the following error:

Exception Type:
  TypeError
  Exception Value:
  __deepcopy__() takes exactly 2 arguments (1 given)
  Exception Location:
  /usr/lib64/python2.4/site-packages/django/utils/datastructures.py in copy, line 187

Change History (2)

comment:1 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [3081]) Fixed #2079 -- Fixed bug introduced in [3070] in django.utils.datastructures

comment:2 Changed 9 years ago by lukeplant

Sorry, my bad. I didn't notice that MultiValueDict.copy() called deepcopy() without arguments (which the deepcopy algorithm doesn't do). Maybe the fix should go there, but it doesn't really matter.

Note: See TracTickets for help on using tickets.
Back to Top