Changeset 14225 for main


Ignore:
Timestamp:
24 Oct 2016, 10:13:36 (8 years ago)
Author:
Henrik Bettermann
Message:

Add TicketError? exception.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r14133 r14225  
    8585
    8686
     87class TicketError(Exception):
     88    """A course ticket could not be added
     89    """
     90    pass
     91
    8792# Save function used for save methods in pages
    8893def msave(view, **data):
     
    149154    except KeyError:
    150155        view.flash(_('The ticket exists.'), type="warning")
     156        return False
     157    except TicketError:
     158        # Ticket errors are not being raised in the base package.
     159        view.flash(_('This course cannot be registered.'), type="warning")
    151160        return False
    152161    view.flash(_('Successfully added ${a}.',
Note: See TracChangeset for help on using the changeset viewer.