#NEWLINE# def get_date_modified( self , obj ) : #NEWLINE# #INDENT# mod_dt = None #NEWLINE# if ( ( obj . provider == 'osfstorage' ) and obj . versions ) : #NEWLINE# #INDENT# mod_dt = obj . versions [ ( - 1 ) ] . date_created #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( obj . provider != 'osfstorage' ) and obj . history ) : #NEWLINE# #INDENT# mod_dt = obj . history [ ( - 1 ) ] . get ( 'modified' , None ) #NEWLINE# #UNINDENT# #UNINDENT# return ( mod_dt and mod_dt . replace ( tzinfo = pytz . utc ) )