#NEWLINE# def current_user_owns_tiid( tiid ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# profile_for_current_user = db . session . query ( Profile ) . get ( int ( current_user . id ) ) #NEWLINE# db . session . expunge ( profile_for_current_user ) #NEWLINE# return ( tiid in profile_for_current_user . tiids ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# return False