def _fix_results(results):
 results = [obj._results_dict for obj in results]
 for obj in results:
  for key in ('indexed_on', 'created', 'updated'):
   if ((key in obj) and (not isinstance(obj[key], datetime))):
    obj[key] = datetime.fromtimestamp(int(obj[key]))
 return results

def _fix_results ( results ) : results = [ obj . _results_dict for obj in results ] for obj in results : for key in ( 'indexed_on' , 'created' , 'updated' ) : if ( ( key in obj ) and ( not isinstance ( obj [ key ] , datetime ) ) ) : obj [ key ] = datetime . fromtimestamp ( int ( obj [ key ] ) ) return results
fixes up the s results for better templating 1 .