Changeset 16771


Ignore:
Timestamp:
2 Feb 2022, 10:14:37 (3 years ago)
Author:
Henrik Bettermann
Message:

If applicant has collected transcript before, type of order must be 'original'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py

    r16744 r16771  
    2222#from grok import getSite
    2323from zope import schema
    24 #from zope.interface import invariant, Invalid
     24from zope.interface import invariant, Invalid
    2525from zope.component import getUtility
    2626from zope.catalog.interfaces import ICatalog
     
    395395        source = OrderSource(),
    396396        title = _(u'Type of Order'),
    397         required = False,
     397        required = True,
    398398        )
    399399
     
    434434        show_year = True,
    435435        )
     436
     437    @invariant
     438    def type_of_order(applicant):
     439        if applicant.collected and applicant.order != 'o':
     440            raise Invalid(_("If you have collected transcript before, type of order must be 'original'."))
    436441
    437442
Note: See TracChangeset for help on using the changeset viewer.