def get_affected_nodes(db, addon_class):
 query = db['node'].find({'.'.join(('__backrefs', 'addons', addon_class.__name__.lower(), 'owner', '0')): {'$exists': False}})
 return (Node.load(node['_id']) for node in query)

def get_affected_nodes ( db , addon_class ) : query = db [ 'node' ] . find ( { '.' . join ( ( '__backrefs' , 'addons' , addon_class . __name__ . lower ( ) , 'owner' , '0' ) ) : { '$exists' : False } } ) return ( Node . load ( node [ '_id' ] ) for node in query )
generate affected nodes .