Skip to content
Snippets Groups Projects
Unverified Commit 826c9527 authored by Fredrik Jonsson's avatar Fredrik Jonsson Committed by GitHub
Browse files

Merge pull request #644 from OpenTechFund/bugfix/iterable-error-is_initial

Avoid a object is not iterable error in is_initial() when submitting …
parents 968ecde1 54a1b074
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