Skip to content
Snippets Groups Projects
Commit 54a1b074 authored by Fredrik Jonsson's avatar Fredrik Jonsson
Browse files

Avoid a object is not iterable error in is_initial() when submitting new form.

parent 968ecde1
No related branches found
No related tags found
No related merge requests found
......@@ -18,9 +18,12 @@ class MultiFileInput(ClearableFileInput):
def is_initial(self, value):
is_initial = super().is_initial
return all(
is_initial(file) for file in value
)
try:
return all(
is_initial(file) for file in value
)
except TypeError:
return is_initial(value)
def render(self, name, value, attrs=dict()):
if self.multiple:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment