Changeset 2284 for WAeUP_SRP/base


Ignore:
Timestamp:
27 Sep 2007, 17:38:25 (17 years ago)
Author:
joachim
Message:

check for course when adding certificate_course_id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2283 r2284  
    10881088            for cert in res:
    10891089                self._v_certificates[cert.getId] = cert.getObject()
     1090        certificate_course_id = mapping.get('code')
     1091        if not self.courses_catalog(code = certificate_course_id):
     1092            return '', "No Course with ID: %s" % certificate_course_id
    10901093        cert_id = mapping['certificate_code']
    10911094        cert = self._v_certificates.get(cert_id,None)
    10921095        if cert is None:
    1093             return '', "No Certificate with ID: %s" % did
    1094         certificate_course_id = mapping.get('code')
     1096            return '', "No Certificate with ID: %s" % cert_id
    10951097        if certificate_course_id in self._v_certificate_course_list:
    10961098            return '', "Duplicate CertificateCourse ID: %s" % certificate_course_id
Note: See TracChangeset for help on using the changeset viewer.