#NEWLINE# def collect( self , objs , source_attr = None , **kwargs ) : #NEWLINE# #INDENT# for obj in objs : #NEWLINE# #INDENT# if source_attr : #NEWLINE# #INDENT# self . add_edge ( getattr ( obj , source_attr ) , obj ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . add_edge ( None , obj ) #NEWLINE# #UNINDENT# #UNINDENT# try : #NEWLINE# #INDENT# return super ( NestedObjects , self ) . collect ( objs , source_attr = source_attr , ** kwargs ) #NEWLINE# #UNINDENT# except models . ProtectedError as e : #NEWLINE# #INDENT# self . protected . update ( e . protected_objects )