def task_status_show(context, data_dict):
 model = context['model']
 id = data_dict.get('id')
 if id:
  task_status = model.TaskStatus.get(id)
 else:
  query = model.Session.query(model.TaskStatus).filter(_and_((model.TaskStatus.entity_id == _get_or_bust(data_dict, 'entity_id')), (model.TaskStatus.task_type == _get_or_bust(data_dict, 'task_type')), (model.TaskStatus.key == _get_or_bust(data_dict, 'key'))))
  task_status = query.first()
 context['task_status'] = task_status
 _check_access('task_status_show', context, data_dict)
 if (task_status is None):
  raise NotFound
 task_status_dict = model_dictize.task_status_dictize(task_status, context)
 return task_status_dict

def task_status_show ( context , data_dict ) : model = context [ 'model' ] id = data_dict . get ( 'id' ) if id : task_status = model . TaskStatus . get ( id ) else : query = model . Session . query ( model . TaskStatus ) . filter ( _and_ ( ( model . TaskStatus . entity_id == _get_or_bust ( data_dict , 'entity_id' ) ) , ( model . TaskStatus . task_type == _get_or_bust ( data_dict , 'task_type' ) ) , ( model . TaskStatus . key == _get_or_bust ( data_dict , 'key' ) ) ) ) task_status = query . first ( ) context [ 'task_status' ] = task_status _check_access ( 'task_status_show' , context , data_dict ) if ( task_status is None ) : raise NotFound task_status_dict = model_dictize . task_status_dictize ( task_status , context ) return task_status_dict
return a task status .