#NEWLINE# def findbyjobgroup_id1( session , jobgroup_id ) : #NEWLINE# #INDENT# if jobgroup_id : #NEWLINE# #INDENT# query = session . query ( Machine ) . add_entity ( Machine2Jobgroup ) . join ( Machine2Jobgroup ) #NEWLINE# query = query . filter ( ( Machine2Jobgroup . jobgroup_id == jobgroup_id ) ) #NEWLINE# return query . first ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None