From ec13db7de2c2d0d4c2f6eb25e76cb36cb6836a38 Mon Sep 17 00:00:00 2001 From: Alexandre Morignot Date: Thu, 27 Nov 2014 15:48:23 +0100 Subject: [PATCH] [CapCalendarEvent] default values for Query fields --- weboob/capabilities/calendar.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/weboob/capabilities/calendar.py b/weboob/capabilities/calendar.py index b4109941..2a56ce4c 100644 --- a/weboob/capabilities/calendar.py +++ b/weboob/capabilities/calendar.py @@ -97,20 +97,10 @@ class Query(BaseObject): start_date = DateField('Start date of the event') end_date = DateField('End date of the event') city = StringField('Name of the city in witch event will take place') - categories = Field('List of categories of the event', list, tuple) - ticket = Field('List of status of the tickets sale', list, tuple) + categories = Field('List of categories of the event', list, tuple, default=CATEGORIES.values) + ticket = Field('List of status of the tickets sale', list, tuple, default=TICKET.values) summary = StringField('Title of the event') - def __init__(self): - BaseObject.__init__(self, '') - self.categories = [] - for value in CATEGORIES.values: - self.categories.append(value) - - self.ticket = [] - for value in TICKET.values: - self.ticket.append(value) - class CapCalendarEvent(CapCollection): """