From a93a9025d6574052d37bd3bcd0e613eee76d0ebc Mon Sep 17 00:00:00 2001 From: Bezleputh Date: Wed, 13 Nov 2013 00:25:52 +0100 Subject: [PATCH] [ICapCalendar] Rename entry => booked_entries and max_entry => max_entries --- weboob/applications/boobcoming/boobcoming.py | 14 +++++++------- weboob/capabilities/calendar.py | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/weboob/applications/boobcoming/boobcoming.py b/weboob/applications/boobcoming/boobcoming.py index 454487e0..8ec4dee0 100644 --- a/weboob/applications/boobcoming/boobcoming.py +++ b/weboob/applications/boobcoming/boobcoming.py @@ -115,13 +115,13 @@ class UpcomingFormatter(IFormatter): if hasattr(obj, 'event_planner') and not empty(obj.event_planner): result += u'Event planner: %s/%s \n' % (obj.event_planner) - if hasattr(obj, 'entry') and not empty(obj.entry) and \ - hasattr(obj, 'max_entry') and not empty(obj.max_entry): - result += u'Entry: %s/%s \n' % (obj.entry, obj.max_entry) - elif hasattr(obj, 'entry') and not empty(obj.entry): - result += u'Entry: %s \n' % (obj.entry) - elif hasattr(obj, 'max_entry') and not empty(obj.max_entry): - result += u'Max entries: %s \n' % (obj.max_entry) + if hasattr(obj, 'booked_entries') and not empty(obj.booked_entries) and \ + hasattr(obj, 'max_entries') and not empty(obj.max_entries): + result += u'Entry: %s/%s \n' % (obj.booked_entries, obj.max_entries) + elif hasattr(obj, 'booked_entries') and not empty(obj.booked_entries): + result += u'Entry: %s \n' % (obj.booked_entries) + elif hasattr(obj, 'max_entries') and not empty(obj.max_entries): + result += u'Max entries: %s \n' % (obj.max_entries) if hasattr(obj, 'description') and not empty(obj.description): result += u'Description:\n %s\n\n' % obj.description diff --git a/weboob/capabilities/calendar.py b/weboob/capabilities/calendar.py index bd1fafb4..09d530e8 100644 --- a/weboob/capabilities/calendar.py +++ b/weboob/capabilities/calendar.py @@ -53,8 +53,8 @@ class BaseCalendarEvent(CapBaseObject): category = StringField('Category of the event') description = StringField('Description of the event') price = FloatField('Price of the event') - entry = IntField('Entry number') - max_entry = IntField('Max entry number') + booked_entries = IntField('Entry number') + max_entries = IntField('Max entry number') event_planner = StringField('Name of the event planner') #the following elements deal with ICalendar stantdards