"""
Created on Jan 22, 2015

@author: noob
"""

from common.models import CustomUserReport
from django.http import HttpResponse
from django_yauth.decorators import yalogin_required


@yalogin_required
def delete_custom_report(request):
    user = request.yauser
    cur_id = request.GET.get('id', '')
    cur = CustomUserReport.objects.get(n=cur_id)
    if cur.user == user.login:
        cur.active = False
        cur.save()
    return HttpResponse('')
