Ignore:
Timestamp:
5 Oct 2007, 18:49:10 (17 years ago)
Author:
joachim
Message:

check for duplicate certificate_course_ids only in levels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2315 r2319  
    10821082    security.declareProtected(ModifyPortalContent,'mass_create_certificate_course') ###(
    10831083    def mass_create_certificate_course(self,mapping):
    1084         if getattr(self,'_v_certificate_course_list',None) is None:
    1085             self._v_certificate_course_list = []
    10861084        if getattr(self,'_v_ceritficates',None) is None:
    10871085            res = self.portal_catalog(portal_type = "Certificate")
     
    10961094        if cert is None:
    10971095            return '', "No Certificate with ID: %s" % cert_id
    1098         if certificate_course_id in self._v_certificate_course_list:
    1099             return '', "Duplicate CertificateCourse ID: %s" % certificate_course_id
    11001096        level_id = mapping.get('level')
    11011097        level = getattr(cert,level_id,None)
     
    11071103            (certificate_course_id,cert_id,level_id)
    11081104        level.invokeFactory('CertificateCourse', certificate_course_id)
    1109         self._v_certificate_course_list.append(certificate_course_id)
    11101105        c = getattr(level,certificate_course_id)
    11111106        c.getContent().edit(mapping=mapping)
Note: See TracChangeset for help on using the changeset viewer.