0012-misc-fix-no-else-raise-pylint-error-55505.patch
chrono/agendas/models.py | ||
---|---|---|
1000 | 1000 |
% {'label': mt[0], 'slug': mt[1], 'duration': mt[2]} |
1001 | 1001 |
] |
1002 | 1002 |
raise ValidationError(error_msg) |
1003 |
elif real_meetingtypes - virtual_meetingtypes:
|
|
1003 |
if real_meetingtypes - virtual_meetingtypes: |
|
1004 | 1004 |
# extra meeting type in real agenda |
1005 | 1005 |
for mt in real_meetingtypes - virtual_meetingtypes: |
1006 | 1006 |
error_msg += ['Extra meeting type, "%s".' % mt[0]] |
... | ... | |
1585 | 1585 | |
1586 | 1586 |
if len(events) == 0: |
1587 | 1587 |
raise ValueError('No event recurrence found for specified datetime.') |
1588 |
elif len(events) > 1: # should not happen
|
|
1588 |
if len(events) > 1: # should not happen |
|
1589 | 1589 |
raise ValueError('Multiple events found for specified datetime.') |
1590 | 1590 | |
1591 | 1591 |
event = events[0] |
chrono/api/views.py | ||
---|---|---|
1601 | 1601 |
if not events_to_book.exists(): |
1602 | 1602 |
if full_events: |
1603 | 1603 |
raise APIError(_('all events are all full'), err_class='all events are all full') |
1604 |
else: |
|
1605 |
raise APIError(_('no event recurrences to book'), err_class='no event recurrences to book') |
|
1604 |
raise APIError(_('no event recurrences to book'), err_class='no event recurrences to book') |
|
1606 | 1605 | |
1607 | 1606 |
events_to_book = Event.annotate_queryset(events_to_book) |
1608 | 1607 |
events_to_book = events_to_book.annotate( |
1609 |
- |