diff --git a/django/forms/fields.py b/django/forms/fields.py index 9cc93a46e1c..a9772565253 100644 --- a/django/forms/fields.py +++ b/django/forms/fields.py @@ -1113,7 +1113,7 @@ class FilePathField(ChoiceField): (self.allow_folders and f.is_dir())) and (self.match is None or self.match_re.search(f.name))): choices.append((f.path, f.name)) - choices.sort(key=operator.itemgetter(1)) + choices.sort(key=operator.itemgetter(1)) self.choices.extend(choices) self.widget.choices = self.choices