(request, device)
return HttpResponseRedirect(reverse("device", args=[device.uid]))
Marks the client as not deleted anymore
Marks the client as not deleted anymore
Marks the client as not deleted anymore
def undelete(request, device):
    """Marks the client as not deleted anymore"""

    # mark the subscriptions as not deleted anymore
    Subscription.objects.filter(user=request.user, client=device).update(deleted=False)

    # mark the client as not deleted anymore
    device.deleted = False
    device.save()

    return HttpResponseRedirect(reverse("device", args=[device.uid]))
def undelete ( request , device ) : # mark the subscriptions as not deleted anymore Subscription . objects . filter ( user = request . user , client = device ) . update ( deleted = False ) # mark the client as not deleted anymore device . deleted = False device . save ( ) return HttpResponseRedirect ( reverse ( "device" , args = [ device . uid ] ) )