Changeset 8611


Ignore:
Timestamp:
3 Jun 2012, 13:19:07 (12 years ago)
Author:
uli
Message:

Make sure not to confuse an application_category None with no
application_category at all.

File:
1 edited

Legend:

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

    r8607 r8611  
    4141MAX_UPLOAD_SIZE = 1024 * 20
    4242
     43_marker = object() # a marker different from None
     44
    4345class RegNumInSource(ValidationError):
    4446    """Registration number exists already
     
    8991    def contains(self, context, value):
    9092        context_appcat = getattr(getattr(
    91             context, '__parent__', None), 'application_category', None)
    92         if context_appcat is None:
     93            context, '__parent__', None), 'application_category', _marker)
     94        if context_appcat is _marker:
    9395            # If the context (applicant) has no application category,
    9496            # then it might be not part of a container (yet), for
Note: See TracChangeset for help on using the changeset viewer.