Changeset 10218 for main/waeup.futminna


Ignore:
Timestamp:
24 May 2013, 06:10:33 (11 years ago)
Author:
Henrik Bettermann
Message:

Fix logic in filterCertificates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.futminna/trunk/src/waeup/futminna/applicants/utils.py

    r10216 r10218  
    3838        """
    3939        certs = sorted(resultset, key=lambda value: value.code)
    40         resultlist = [cert for cert in certs
    41             if not None in (context.jamb_score, cert.custom_float_1)
    42                 and context.jamb_score >= cert.custom_float_1]
     40        if context.jamb_score is not None:
     41            resultlist = [cert for cert in certs
     42                if cert.custom_float_1 is None
     43                  or context.jamb_score >= cert.custom_float_1]
     44        else:
     45            resultlist = certs
    4346        curr_course = context.course1
    4447        if curr_course is not None and curr_course not in resultlist:
Note: See TracChangeset for help on using the changeset viewer.