def did_create(request, r_type):
    if is_logged(request):
        user = login.get_user_by_session(request, request.session.get(s.SESSION_LOGIN))
        p = user_permission.objects.get(user_id=user, type=r_type)
        p.volume = (p.volume - 1)
        p.save()
def did_create(request, r_type):
    if is_logged(request):
        user = login.get_user_by_session(request, request.session.get(s.SESSION_LOGIN))
        p = user_permission.objects.get(user_id=user, type=r_type)
        p.volume = (p.volume - 1)
        p.save()