fields: fix attachment of country options in 1.11

This commit is contained in:
Frédéric Péters 2019-01-16 16:38:32 +01:00
parent 6732fca7ae
commit c0fb61b15c
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ class CountryWidget(forms.Select):
self.choices = [(x['id'], x['text']) for x in requests.get(country_url).json()['data']]
except ValueError:
self.choices = []
super(forms.Select, self).__init__(attrs=attrs)
super(forms.Select, self).__init__(attrs=attrs, choices=self.choices)
class CountryField(forms.CharField):