@treeio_login_required
@handle_response_format
def object_untrash(request, object_id, response_format='html'):
 object = get_object_or_404(Object, pk=object_id)
 if (not request.user.profile.has_permission(object, mode='w')):
  return user_denied(request, message="You don't have access to this Object")
 related = object.get_related_object()
 if related:
  related.trash = False
  related.save()
 else:
  object.trash = False
  object.save()
 return HttpResponseRedirect(reverse('core_trash'))

@ treeio_login_required @ handle_response_format def object_untrash ( request , object_id , response_format = 'html' ) : object = get_object_or_404 ( Object , pk = object_id ) if ( not request . user . profile . has_permission ( object , mode = 'w' ) ) : return user_denied ( request , message = "You don't have access to this Object" ) related = object . get_related_object ( ) if related : related . trash = False related . save ( ) else : object . trash = False object . save ( ) return HttpResponseRedirect ( reverse ( 'core_trash' ) )
untrash item .