Ignore:
Timestamp:
16 May 2011, 16:19:14 (14 years ago)
Author:
uli
Message:

Shorten application_exists function and make it more reliable. If we
change the applicant lookup method in get_applicant_data() we now
automatically have that reflect in applicant_exists.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/root.py

    r6069 r6119  
    2929
    3030class ApplicantsRoot(grok.Container):
    31     """The root of applicants-related components. It contains only 
     31    """The root of applicants-related components. It contains only
    3232    containers for applicants.
    3333    """
     
    111111       `identifier` will normally be an access code.
    112112    """
    113     site = grok.getSite()
    114     for container in site['applicants'].values():
    115         if identifier in container.keys():
    116             return True
    117     return False
     113    applicant = get_applicant_data(identifier)
     114    if applicant is None:
     115        return False
     116    return True
Note: See TracChangeset for help on using the changeset viewer.