#NEWLINE# def get_price_estimate_for_project( serializer , project ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# estimate = models . PriceEstimate . objects . get_current ( project ) #NEWLINE# #UNINDENT# except models . PriceEstimate . DoesNotExist : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# 'threshold' : 0.0 , #NEWLINE# 'total' : 0.0 , #NEWLINE# 'limit' : ( - 1.0 ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# serializer = NestedPriceEstimateSerializer ( instance = estimate , context = estimate . context ) #NEWLINE# return serializer . data