mbraak/django-file-form

Error clearing placeholders from MultipleUploadedFileField

BoPeng opened this issue · 1 comments

using the example project, but set

    input_file = MultipleUploadedFileField(required=False)
    other_input_file = UploadedFileField(required=False)

Then, go to http://127.0.0.1:8000/placeholder, remove the two placeholders, add title, click ok.

If I delete the first file, then the second, the second file will fail to delete (removed from interface, but not metadata).

If I delete the second first, I will get an error

  for f in self.cleaned_data["input_file"]: 

for self.cleaned_data['input_file'] being None instead of []. The latter could be considered a bug although it is easy to fix as

for f in self.cleaned_data['input_file'] or []:

Might be using an older version of the package.