def _get_visible_update(course_update_items):
 if isinstance(course_update_items, dict):
  if (course_update_items.get('status') != CourseInfoModule.STATUS_DELETED):
   return _make_update_dict(course_update_items)
  else:
   return {'error': _('Course update not found.'), 'status': 404}
 return [_make_update_dict(update) for update in course_update_items if (update.get('status') != CourseInfoModule.STATUS_DELETED)]

def _get_visible_update ( course_update_items ) : if isinstance ( course_update_items , dict ) : if ( course_update_items . get ( 'status' ) != CourseInfoModule . STATUS_DELETED ) : return _make_update_dict ( course_update_items ) else : return { 'error' : _ ( 'Course update not found.' ) , 'status' : 404 } return [ _make_update_dict ( update ) for update in course_update_items if ( update . get ( 'status' ) != CourseInfoModule . STATUS_DELETED ) ]
filter course update items which have status "deleted" .