fields: fix attachment of country options in 1.11
This commit is contained in:
parent
6732fca7ae
commit
c0fb61b15c
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue