Changeset 2351


Ignore:
Timestamp:
11 Oct 2007, 16:53:41 (17 years ago)
Author:
Henrik Bettermann
Message:

fix moveImagesToFS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2342 r2351  
    702702        if os.path.exists(picture_path):
    703703            return open(picture_path).read()
    704        
     704
    705705
    706706    ###)
     
    10911091        if getattr(self,'_v_courses',None) is None:
    10921092            res = self.courses_catalog()
    1093             self._v_courses= [course.code for course in res] 
     1093            self._v_courses= [course.code for course in res]
    10941094        if getattr(self,'_v_ceritficates',None) is None:
    10951095            res = self.portal_catalog(portal_type = "Certificate")
     
    10981098                self._v_certificates[cert.getId] = cert.getObject()
    10991099        certificate_course_id = mapping.get('code')
    1100         if certificate_course_id not in self._v_courses: 
     1100        if certificate_course_id not in self._v_courses:
    11011101            return '', "No Course with ID: %s" % certificate_course_id
    11021102        cert_id = mapping['certificate_code']
     
    14801480                    continue
    14811481                #import pdb;pdb.set_trace()
    1482                 image = getattr(doc,key)
    1483                 if not hasattr(image,"data"):
     1482                image = getattr(doc,key,None)
     1483                if not image or not hasattr(image,"data"):
    14841484                    continue
    14851485                if not created:
Note: See TracChangeset for help on using the changeset viewer.