mirror of https://github.com/django/django.git
Refs #29689 -- Moved FilePathField choices sorting outside the loop.
This commit is contained in:
parent
39461a83c3
commit
54b331451c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue