Changeset 949


Ignore:
Timestamp:
27 Nov 2006, 14:41:56 (18 years ago)
Author:
joachim
Message:

avoid attribute error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/exportimport.py

    r940 r949  
    7676    campus = getattr(site.portal_url.getPortalObject(),'campus',None)
    7777    if campus is not None:
    78         campus.academics.manage_setLocalGroupRoles(groupid='Authenticated',
     78        academics = getattr(campus,'academics',None)
     79        students = getattr(campus,'students',None)
     80        if academics is not None:
     81            academics.manage_setLocalGroupRoles(groupid='Authenticated',
    7982                                         roles=('SectionReader',))
    80         pm.setLocalGroupRoles(campus.students,['group:ClearanceOfficers',
     83        if students is not None:
     84            pm.setLocalGroupRoles(campus.students,['group:ClearanceOfficers',
    8185                                           'role:Student',],'SectionReader')
    8286##    pm.setLocalGroupRoles(campus.academics,['role:Authenticated',
Note: See TracChangeset for help on using the changeset viewer.