@signals.contributor_removed.connect
def remove_contributor_from_subscriptions(node, user):
 if (user._id not in node.admin_contributor_ids):
  node_subscriptions = get_all_node_subscriptions(user, node)
  for subscription in node_subscriptions:
   subscription.remove_user_from_subscription(user)

@ signals . contributor_removed . connect def remove_contributor_from_subscriptions ( node , user ) : if ( user . _id not in node . admin_contributor_ids ) : node_subscriptions = get_all_node_subscriptions ( user , node ) for subscription in node_subscriptions : subscription . remove_user_from_subscription ( user )
remove contributor from node subscriptions unless the user is an admin on any of nodes parent projects .