#NEWLINE# @ classmethod #NEWLINE# def get_earlier( cls , assem_id , app_id , status , created_at ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# session = sql . Base . get_session ( ) #NEWLINE# result = session . query ( plan_obj . Plan ) #NEWLINE# result = result . filter ( ( plan_obj . Plan . id == app_id ) ) #NEWLINE# app_uuid = result . one ( ) . uuid #NEWLINE# result = session . query ( plan_obj . Plan ) #NEWLINE# result = result . filter ( ( plan_obj . Plan . uuid == app_uuid ) ) . all ( ) #NEWLINE# plan_id_list = [ plan . id for plan in result ] #NEWLINE# result = session . query ( Assembly ) #NEWLINE# result = result . filter ( Assembly . plan_id . in_ ( plan_id_list ) ) #NEWLINE# result = result . filter ( ( Assembly . created_at < created_at ) ) #NEWLINE# return result . all ( ) #NEWLINE# #UNINDENT# except exc . NoResultFound : #NEWLINE# #INDENT# cls . _raise_not_found ( assem_id )