Ignore:
Timestamp:
28 Oct 2005, 19:44:25 (19 years ago)
Author:
Henrik Bettermann
Message:

bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/skins/waeup_student/add_accommodation.py

    r107 r119  
    1616lt = context.portal_layouts
    1717
    18 accofolder = getattr(context,"Accommodation",None)
    19 if accofolder is None:
    20     context.invokeFactory('AccoFolder','Accommodation')
    21     accofolder = getattr(context,"Accommodation")
    22     context.notifyCPSDocumentCreation(ob=accofolder)
    23    
    24    
    2518res,psm,ds = lt.renderLayout(layout_id= 'accommodation',
    2619                      schema_id = 'accommodation',
     
    4538elif psm == 'valid':
    4639    oid = "%s" % ds.get('heading').replace(' ','')
    47     accofolder.invokeFactory(type_name,oid)
    48     object = getattr(accofolder,oid)   
     40    context.invokeFactory(type_name,oid)
     41    object = getattr(context,oid)
    4942    object.getContent().edit(mapping=ds)
    5043    context.notifyCPSDocumentCreation(ob=object)
    5144    psm = 'new %s created' % oid
    52     context_ti = context.portal_types[context.portal_type] 
     45    context_ti = context.portal_types[context.portal_type]
    5346    index = context_ti.getActionById('view','university_view')
    5447    return getattr(context,index)(psm=psm)
Note: See TracChangeset for help on using the changeset viewer.