Show
Ignore:
Timestamp:
10/20/06 20:56:29 (2 years ago)
Author:
atchertchian
Message:

more fixes on context events

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • CPS4/products/CPSSubscriptions/trunk/EventSubscriptionsManager.py

    r48653 r49783  
    108108 
    109109        # Just more secure in case of the event configuration is badly done. 
    110         if not events_from_context: 
     110        if event_type not in events_from_context: 
    111111            return {} 
    112112 
     
    191191        if infos.get('kwargs_comment') is not None: 
    192192            infos['comments'] = infos['kwargs_comment'] 
    193         if infos.get('kwargs_comments') is not None: 
     193        elif infos.get('kwargs_comments') is not None: 
    194194            infos['comments'] = infos['kwargs_comments'] 
    195195 
  • CPS4/products/CPSSubscriptions/trunk/SubscriptionsTool.py

    r49779 r49783  
    729729        done on containers. 
    730730        """ 
     731        mapping = {} 
    731732        if context is not None: 
    732733            context_portal_type = getattr(context, 'portal_type', '') 
     
    736737                container = aq_parent(aq_inner(context)) 
    737738                container_portal_type = getattr(container, 'portal_type', '') 
    738                 return self.mapping_context_events.get(container_portal_type, {}) 
    739         return {} 
     739                mapping = self.mapping_context_events.get(container_portal_type, {}) 
     740        return mapping 
    740741 
    741742    security.declarePublic('getFilteredAllowedToSubscribeEventsFromContext')