def term_translation_update_many(context, data_dict):
 model = context['model']
 if (not (data_dict.get('data') and isinstance(data_dict.get('data'), list))):
  raise ValidationError({'error': 'term_translation_update_many needs to have a list of dicts in field data'})
 context['defer_commit'] = True
 action = _get_action('term_translation_update')
 for (num, row) in enumerate(data_dict['data']):
  action(context, row)
 model.Session.commit()
 return {'success': ('%s rows updated' % (num + 1))}

def term_translation_update_many ( context , data_dict ) : model = context [ 'model' ] if ( not ( data_dict . get ( 'data' ) and isinstance ( data_dict . get ( 'data' ) , list ) ) ) : raise ValidationError ( { 'error' : 'term_translation_update_many needs to have a list of dicts in field data' } ) context [ 'defer_commit' ] = True action = _get_action ( 'term_translation_update' ) for ( num , row ) in enumerate ( data_dict [ 'data' ] ) : action ( context , row ) model . Session . commit ( ) return { 'success' : ( '%s rows updated' % ( num + 1 ) ) }
create or update many term translations at once .