#NEWLINE# @ target_required #NEWLINE# def GetByIDAsDict( self , trans_id , target_id = None ) : #NEWLINE# #INDENT# transaction_obj = self . db . session . query ( models . Transaction ) . filter_by ( target_id = target_id , id = trans_id ) . first ( ) #NEWLINE# if ( not transaction_obj ) : #NEWLINE# #INDENT# raise InvalidTransactionReference ( ( ( 'No transaction with ' + str ( trans_id ) ) + ' exists' ) ) #NEWLINE# #UNINDENT# return self . DeriveTransactionDict ( target_id , include_raw_data = True )