#NEWLINE# def _get_ledger( self , unique_ledger_reference ) : #NEWLINE# #INDENT# from corehq.apps.commtrack.models import StockState #NEWLINE# try : #NEWLINE# #INDENT# return StockState . objects . get ( case_id = self . case_id , section_id = unique_ledger_reference . section_id , product_id = unique_ledger_reference . entry_id ) #NEWLINE# #UNINDENT# except StockState . DoesNotExist : #NEWLINE# #INDENT# return None