#NEWLINE# @ db_api . serialize #NEWLINE# def task_list( self , status = None , deployment = None ) : #NEWLINE# #INDENT# query = self . model_query ( models . Task ) #NEWLINE# filters = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( status is not None ) : #NEWLINE# #INDENT# filters [ 'status' ] = status #NEWLINE# #UNINDENT# if ( status is not None ) : #NEWLINE# #INDENT# filters [ 'deployment_uuid' ] = self . deployment_get ( deployment ) [ 'uuid' ] #NEWLINE# #UNINDENT# if filters : #NEWLINE# #INDENT# query = query . filter_by ( ** filters ) #NEWLINE# #UNINDENT# return query . all ( )