From 0031d025aa3bb45acc99042592c5a8a3a8b62524 Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 11 May 2018 09:28:20 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8D=E4=B8=8A=E6=AC=A1?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=BC=95=E8=B5=B7=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ops/api.py | 7 ------- apps/ops/views.py | 3 --- 2 files changed, 10 deletions(-) diff --git a/apps/ops/api.py b/apps/ops/api.py index a68f1c529..35c9b8dc5 100644 --- a/apps/ops/api.py +++ b/apps/ops/api.py @@ -70,13 +70,6 @@ class CeleryTaskLogApi(generics.RetrieveAPIView): end = False queryset = CeleryTask.objects.all() - def get_object(self): - return CeleryTask( - id="4cae9ad8-1116-45e7-b019-9b1856696fd7", - log_path="2018-05-10/ca77e6db-9ac6-4970-80d1-eecdbcc3fcc5.log", - status="finished" - ) - def get(self, request, *args, **kwargs): mark = request.query_params.get("mark") or str(uuid.uuid4()) task = self.get_object() diff --git a/apps/ops/views.py b/apps/ops/views.py index a8af61789..e3ba2789a 100644 --- a/apps/ops/views.py +++ b/apps/ops/views.py @@ -124,6 +124,3 @@ class AdHocHistoryDetailView(AdminUserRequiredMixin, DetailView): class CeleryTaskLogView(AdminUserRequiredMixin, DetailView): template_name = 'ops/celery_task_log.html' model = CeleryTask - - def get_object(self, queryset=None): - return CeleryTask(id="4cae9ad8-1116-45e7-b019-9b1856696fd7")