def delete_detail(self, request, **kwargs):
        res = super(MTResource, self).delete_detail(request, **kwargs)
        # FIXME: By TastyPie default, DELETE returns 204 No Content
        # But message_ui middleware has problem with response with no
        # content-type.
        # Replace the rest of the method with these after message_ui updated:
        #    del(res._headers["content-type"])
        #    return res
        if (res.status_code == 204):
            return HttpResponse()
        else:
            return res
Avoid the following error:
dataset/ETHPy150Open mozilla/moztrap/moztrap/model/mtapi.py/MTResource.delete_detail