def _full_ct_query(action, actor_only=None):
 actstream.registry.check(action.actor)
 query = _ct_query(action.actor)
 if (action.target is not None):
  actstream.registry.check(action.target)
  query |= _ct_query(action.target, actor_only)
 if (action.action_object is not None):
  actstream.registry.check(action.action_object)
  query |= _ct_query(action.action_object, actor_only)
 return query

def _full_ct_query ( action , actor_only = None ) : actstream . registry . check ( action . actor ) query = _ct_query ( action . actor ) if ( action . target is not None ) : actstream . registry . check ( action . target ) query |= _ct_query ( action . target , actor_only ) if ( action . action_object is not None ) : actstream . registry . check ( action . action_object ) query |= _ct_query ( action . action_object , actor_only ) return query
build a query that matches objects with a content type that matches an action .