5285: Add a blank entry on countries list

svn: r18255
This commit is contained in:
Jérôme Rapinat 2011-10-07 10:20:21 +00:00
parent e328d7473b
commit e7935f0e0d

View File

@ -370,6 +370,10 @@ class CalendarOptions(MenuReportOptions):
country = EnumeratedListOption(_("Country for holidays"), 0)
holiday_table = libholiday.HolidayTable()
holiday_table.sort()
if (len(holiday_table) == 0 or
(len(holiday_table) > 0 and holiday_table[0] != '')):
holiday_table.insert(0, '')
count = 0
for c in holiday_table.get_countries():
country.add_item(count, c)